X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=FastMmap.pm;h=35c3a2e5eca76e86654ee37a2e608636c0416232;hb=6601b0517c68bca8629f4d8e348fc6aca220f4c9;hp=c81362859c9742340aba59d0b59e58dfb5730f90;hpb=5e0e17c813151faedeba3c02525db6733ee051e7;p=catagits%2FCatalyst-Plugin-Session-State-Cookie.git diff --git a/FastMmap.pm b/FastMmap.pm index c813628..35c3a2e 100644 --- a/FastMmap.pm +++ b/FastMmap.pm @@ -9,7 +9,7 @@ use URI; use URI::Find; use File::Temp 'tempdir'; -our $VERSION = '0.09'; +our $VERSION = '0.12'; __PACKAGE__->mk_classdata('_session'); __PACKAGE__->mk_accessors('sessionid'); @@ -53,11 +53,12 @@ sub finalize { if ( my $cookie = $c->request->cookies->{session} ) { $set = 0 if $cookie->value eq $sid; } - $c->response->cookies->{session} = { - value => $sid, - expires => "+" . $self->config->{session}->{expires} . "s" - } - if $set; + if ( $set ) { + $c->response->cookies->{session} = { + value => $sid, + expires => '+' . $c->config->{session}->{expires} . 's' + }; + } if ( $c->config->{session}->{rewrite} ) { my $finder = URI::Find->new( sub {