Changeset 2 for apps/trunk/lib/Sophie.pm


Ignore:
Timestamp:
11/08/10 08:01:52 (14 years ago)
Author:
nanardon
Message:
  • add first component
File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/trunk/lib/Sophie.pm

    r1 r2  
    22use Moose; 
    33use namespace::autoclean; 
    4  
    54use Catalyst::Runtime 5.80; 
     5use Sophie::Base; 
    66 
    77# Set flags and add plugins for the application 
     
    1414 
    1515use Catalyst qw/ 
    16     -Debug 
    1716    ConfigLoader 
    1817    Static::Simple 
     18    Session 
     19    Session::Store::DBI 
     20    Session::State::Cookie 
     21    Compress::Zlib 
     22    Server 
     23    Server::XMLRPC 
    1924/; 
    2025 
     
    3742    # Disable deprecated behavior needed by old applications 
    3843    disable_component_resolution_regex_fallback => 1, 
     44#    default_view => 'TT', 
    3945); 
     46 
     47__PACKAGE__->config->{session} = { 
     48    expires   => 31536000, 
     49    dbi_dsn   => 'noo', 
     50    dbi_table => 'sessions', 
     51}; 
    4052 
    4153# Start the application 
    4254__PACKAGE__->setup(); 
     55 
     56# This is after because db config is in config file 
     57__PACKAGE__->config->{session}{dbi_dsn} = 
     58    'dbi:Pg:' . __PACKAGE__->config->{dbconnect}; 
     59__PACKAGE__->config->{session}{dbi_user} = 
     60    __PACKAGE__->config->{dbuser}; 
     61__PACKAGE__->config->{session}{dbi_pass} = 
     62    __PACKAGE__->config->{dbpassword}; 
    4363 
    4464 
Note: See TracChangeset for help on using the changeset viewer.