[Catalyst] Catalyst update issues
Matt S Trout
dbix-class at trout.me.uk
Tue Apr 4 18:32:33 CEST 2006
Chisel Wright wrote:
> On Tue, Apr 04, 2006 at 05:02:18PM +0100, Matt S Trout wrote:
>> Oooh, are you trying to store DBIC objects in the session?
>
> Yep, it's always worked before, basically:
>
> if ($c->user and not defined $c->session->{authed_user}) {
> $results = $c->model(...)->table(...)->search(...);
> $c->session->{authed_user} = $results->first()
> }
>
> Is this bad now then? Or was it always bad and I just got away with it
> before?
This is a result of the 0.05 move to having a live schema object. the session
now tries to serialize the $dbh and stuff, and gets upset as a result.
Switching to Authentication::Store::DBIC, which handles making the DBIC $user
available for you, should get round it. I'm kinda surprised
Serialize::Storable didn't though - if you could narrow it down to a simpler
test case and lob it at the DBIC list it'd be much appreciated.
--
Matt S Trout Offering custom development, consultancy and support
Technical Director contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd. mst (at) shadowcatsystems.co.uk for more information
+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +
More information about the Catalyst
mailing list