Subject: | Flash broke |
Date: | Fri, 04 Apr 2014 17:13:41 +0100 |
To: | bug-Mojolicious-Plugin-WWWSession [...] rt.cpan.org |
From: | JD <drj [...] ftumsh.org> |
Apologies for no patchfile, fix is below, though...
Mojolicious::Sessions->loading changes the session before it gets to the
plugin.
$stash->{'mojo.session'} = $session;
$session->{flash} = delete $session->{new_flash} if
$session->{new_flash};
}
The fix in the plugin is to change from:
tie %session, 'WWW::Session' , $sid, {sid => $sid},
$args->{expires};
$self->stash('mojo.session' => \%session);
to:
tie %session, 'WWW::Session' , $sid, {sid => $sid},
$args->{expires};
$session{flash} = delete $session{new_flash} if
$session{new_flash};
$self->stash('mojo.session' => \%session);