[Catalyst] DateTime in session- breaks during login/logout

J. Shirley jshirley at gmail.com
Wed Jun 13 19:11:01 GMT 2007


On 6/13/07, Adam Bartosik <adam.bartosik at hurra.com> wrote:
> I put DateTime object into session like this:
>
> use DateTime;
> $c->session->{dateo} = DateTime->now;
>
> Everything works ok, object is properly stored/retrevied until you login
> or logout.
>
> After logout ($c->logout) I get:
>
> undef error - Invalid locale name or id: , at
> /usr/lib/perl5/Cache/FastMmap.pm line 551
>
> and some warnings from
> Use of uninitialized value in transliteration (tr///) at
> /usr/share/perl5/DateTime/Locale.pm line 202.
> Use of uninitialized value in exists at
> /usr/share/perl5/DateTime/Locale.pm line 206.
> Use of uninitialized value in hash element at
> /usr/share/perl5/DateTime/Locale.pm line 209.
> ...
>
> After that session is broken - you need to destroy it manually or delete
> cookie for new session record.
>
> The same happens using Session::Store::DBI.
> The same happens with DateTime in session when login.
>
> It seems to be related only to DateTime objects, other objects can
> survive in session during login/logout without any problems.
>
> Do you have such problems with DateTime in session?
>
> --
> Adam.Bartosik at hurra.com  http://www.hurra-communications.com/
> $ o m e    t e a m  .  d e v e l o p e r
> Hurra Communications, Krakow/Stuttgart/London/Paris/Madrid
>
>

Hi Adam,

If you don't have DateTime::Locale version 0.34, please try that.
There was a bug in the Storable freeze/thaw handling.

-Jay

-- 
J. Shirley :: jshirley at gmail.com :: Killing two stones with one bird...
http://www.toeat.com



More information about the Catalyst mailing list