Subject: | Mojolicious::Plugin::WWWSession never sets the expires value |
Date: | Sat, 4 May 2013 15:03:49 +0200 |
To: | bug-Mojolicious-Plugin-WWWSession [...] rt.cpan.org |
From: | Florian Adamsky <florian [...] adamsky.it> |
Hello,
I used your Perl Module Mojolicious::Plugin::WWWSession in one of my
latest projects, since there is a need for a pure server side session
management. However, I played with expiration a little bit and found out
that even when I set a correct value for expires, the session never
expires.
After a while, I found out that your Modules does not set the value for
expires correctly. The module WWW::Session in version 0.8 has the
following constructor:
sub new {
my ($class,$sid,$data,$expires) = @_;
$expires ||= -1;
$data ||= {};
[...]
Your modules only sets the $class, $sid and $data, but not $expires,
as you can see in the following line:
tie %session, 'WWW::Session' , $sid, {sid => $sid};
Attached you'll find a patch which adds $args->{expires} to this line
in order to set the expiration time correctly.
If you have any further questions about the patch or the bug, don't
hesitate to ask me.
Thanks
Best regards
--
Florian Adamsky
http://florian.adamsky.it/
Message body is not shown because sender requested not to inline it.
Message body not shown because it is not plain text.