[Catalyst] session in DB example in Catalyst book

Andrew archan2000 at yahoo.com
Sun May 11 06:14:57 BST 2008


And I'm doing everything exactly as the book states except the config change of putting the database path in the YAML file - it's still in the AddressDB.pm file.

I looked in the DBIC.pm file which is generating the error message and the method that is causing the error is below:

sub session_store_model {
    my ($c, $id) = @_;

    my $dbic_class = $c->session_store_dbic_class;
    $c->model($dbic_class, $id) or die "Couldn't find a model named $dbic_class";
}

My question is where does $c->session_store_dbic_class come from?  Is it a class that I'm suppose to define or is it a class that is suppose to be included in the DBIC module?



--- On Sat, 5/10/08, Jonathan Rockway <jon at jrock.us> wrote:

> From: Jonathan Rockway <jon at jrock.us>
> Subject: Re: [Catalyst] session in DB example in Catalyst book
> To: "The elegant MVC web framework" <catalyst at lists.scsys.co.uk>
> Date: Saturday, May 10, 2008, 6:43 PM
> * On Sat, May 10 2008, Andreas Marienborg wrote:
> > 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?
> 
> You shouldn't need that.  The DBIC::Schema model will
> create all the
> classes under the root namespace from the result source
> classes in the
> DBIC schema.
> 
> However, I think the namespace in the book is AddressDB,
> not DBIC.
> 
> Regards,
> Jonathan Rockway
> 
> -- 
> print just => another => perl => hacker => if
> $,=$"
> 
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo:
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ



More information about the Catalyst mailing list