[dancer-users] How to keep Dancer2::Session::Cookie after browser session ends?

Russell Jenkins russell.jenkins at strategicdata.com.au
Mon Jun 23 08:25:37 BST 2014

Hey Pavel,

To alter the session expiry from  what you have set for the 
(or 'default_duration') in your apps' config, you can use alter the 
session cookie
expiry via the session keyword: ('session' called without args return 
the session


get '/' => sub {
     session->expires(10);    # 10 seconds from now.

Hope that helps,

On 22/06/2014 10:17 pm, Pavel Denisov wrote:
> I use Dancer2::Session::Cookie and am trying to implement "Remember
> me" option for user login. I understand that I need to set 'expires'
> to some future date for session cookie, but how do I do it in Dancer?
> 'cookie_duration' configuration parameter makes this, but it is
> read-only and I can not change it depending on user input.
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

More information about the dancer-users mailing list