
archan2000 at yahoo
May 10, 2008, 1:50 AM
Post #5 of 11
(315 views)
Permalink
|
|
Re: session in DB example in Catalyst book
[In reply to]
|
|
The only Session.pm is found in /AddressBook/Schema. I don't have Models for the People or Addresses that I'm retrieving in this address book example, but I've only got Schemas and Controllers. The code of /AddressBook/Schema/Session.pm is and as you can see by the package designation Session.pm is suppose to be under the Schema directory and not the Model directory. -------------------------------- package AddressBook::Schema::AddressDB::Session; use base qw/DBIx::Class/; __PACKAGE__->load_components(qw/Core/); __PACKAGE__->table('sessions'); __PACKAGE__->add_columns( id => { data_type => "CHAR", is_nullable => 0, size => 72 }, session_data => { data_type => "TEXT", is_nullable => 1, size => undef }, expires => { data_type => "INTEGER", is_nullable => 1, size => undef} ); __PACKAGE__->set_primary_key('id'); 1; ----------------------------------- --- On Fri, 5/9/08, Andreas Marienborg <omega[at]palle.net> wrote:
From: Andreas Marienborg <omega[at]palle.net> Subject: Re: [Catalyst] session in DB example in Catalyst book To: archan2000[at]yahoo.com, "The elegant MVC web framework" <catalyst[at]lists.scsys.co.uk> Date: Friday, May 9, 2008, 10:19 PM On May 10, 2008, at 3:53 AM, Andrew wrote:
Using the Rockway's Catalyst book to help bring me up to speed on Catalyst and I've got a problem that I can't figure out. On page 59, where it uses a database to store the session key, I've made all the code changes, but when I start the server it gives me the following error: "Couldn't find a model named DBIC::Session at /usr/local/share/perl/5.8.8/Catalyst/Plugin/Session/Store/DBIC.pm line 143. Compilation failed in require at script/addressbook_server.pl line 53."
You don't seem to have the Model you configured the session store to use. Do you have the MyApp/Model/DBIC/Session.pm file? - andreas Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.
|