Changeset 61 in bookmarks for trunk/app.psgi


Ignore:
Timestamp:
08/23/13 16:50:59 (11 years ago)
Author:
peter
Message:
  • wrap the creation of the Bookmarks object into the BookmarkController
  • bookmark is a lazy-loaded read-only attribute with a builder in BookmarkController
  • made dbname and request required attributes of BookmarkController
  • updated the api notes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/app.psgi

    r60 r61  
    88 
    99use BookmarkController; 
    10 use Bookmarks; 
    1110 
    1211#TODO: allow a different config file on the command line, or set options from the command line 
     
    1918    my $req = shift; 
    2019 
    21     my $controller = BookmarkController->new({ 
     20    return BookmarkController->new({ 
    2221        request => $req, 
     22        dbname  => $config->{dbname}, 
    2323    }); 
    24     my $bookmarks = Bookmarks->new({ 
    25         dbname   => $config->{dbname}, 
    26         base_uri => $controller->base_uri, 
    27     }); 
    28     $controller->bookmarks($bookmarks); 
    29     return $controller; 
    3024} 
    3125 
Note: See TracChangeset for help on using the changeset viewer.