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

Adam Bartosik adam.bartosik at hurra.com
Wed Jun 13 16:48:56 GMT 2007


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



More information about the Catalyst mailing list