Changeset 98 in bookmarks for trunk/lib/BookmarksApp.pm


Ignore:
Timestamp:
06/10/15 16:17:18 (9 years ago)
Author:
peter
Message:

only initialize the controller once, and just set the request to a new Plack::Request each time the application is called

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/BookmarksApp.pm

    r92 r98  
    9494        } 
    9595    ); 
     96    $self->_controller( 
     97        Bookmarks::Controller->new({ 
     98            dbname  => $self->config->{dbname}, 
     99        }) 
     100    ); 
    96101} 
    97102 
     
    101106 
    102107    # initialize the controller based on this request 
    103     $self->_controller( 
    104         Bookmarks::Controller->new({ 
    105             request => Plack::Request->new($env), 
    106             dbname  => $self->config->{dbname}, 
    107         }) 
    108     ); 
     108    $self->_controller->request(Plack::Request->new($env)); 
    109109 
    110110    # dispatch to the app 
Note: See TracChangeset for help on using the changeset viewer.