[Catalyst] missing 'use base' for ::Store?

John Lifsey - Contractor - john.lifsey at nrl.navy.mil
Fri Dec 2 20:08:17 CET 2005


Thanks, I was beating my head against the desk for a few minutes on this 
one.

Chisel Wright wrote:
> Decided to have a look at the new Store/State session plugins earlier. I
> suspect there's a "use base qw/Catalyst::Plugin::Session/" missing from
> either Catalyst::Plugin::Session::Store or
> Catalyst::Plugin::Session::Store::CDBI
>
> I put together a really small app, with one table (web_session) and a
> default action which sticks a value in the session and displays the
> (default) welcome page.
>
> Running tests on it I was getting the following error:
>
>   [Wed Nov 23 18:56:29 2005] [catalyst] [error] Caught exception in
>   engine "Can't locate object method "sessionid" via package "App2" at
>   /usr/lib/perl5/vendor_perl/5.8.7/Catalyst/Plugin/Session/State/Cookie.pm
>   line 22."
>   Use of uninitialized value in pattern match (m//) at
>   /usr/lib/perl5/vendor_perl/5.8.7/HTTP/Request/AsCGI.pm line 156.
>   Use of uninitialized value in concatenation (.) or string at
>   /usr/lib/perl5/vendor_perl/5.8.7/HTTP/Request/AsCGI.pm line 157.
>
> I dug around, and the sessionid method is provided by
> Catalyst::Plugin::Session.
> Catalyst::Plugin::Session::Store::CDBI uses
> Catalyst::Plugin::Session::Store as a base class.
>
> Catalyst::Plugin::Session::Store doesn't have any base classes (double
> checked in trunk just now).
>
> I solved the problem locally by adding
>
>   use base qw/Catalyst::Plugin::Session/;
>
> to Catalyst::Plugin::Session::Store. Is this the correct fix? If so,
> could someone do the honours please?
>
>
> I'd also like to submit a pod-patch for
> Catalyst::Plugin::Session::Store::CDBI in the next day or two, as I feel
> it could really benefit from an example table schema (I had to
> guesstimate what would work) - should this go to this list, or direct to
> module author?
>
>
> Cheers,
>
> Chisel
>   
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4082 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051202/ba6ccd12/smime.bin


More information about the Catalyst mailing list