[dancer-users] Dancer2 Cookie Expiry Question

David H untg99 at gmail.com
Thu Aug 20 00:38:59 BST 2015

Hi All,

I've tried setting my own cookie with Dancer2 and also setting the session
engine as Cookie.

I'm using Windows 32 Bit (under Cygwin), with Perl 5.22
Dancer2::Session::Cookie - 0.006
Dancer2 - 0.0161000
Dancer2::Core::Cookie - 0.16000

Although I couldn't find a lot on the Dancer2 method, there is a bit on how
to do this with Dancer1.

I have this in my config.yml (thanks Andrew for the help with this):
template: "template_toolkit"
session: Cookie
       start_tag: '<%'
       end_tag:   '%>'
       secret_key: mykey
       default_duration: 60480064

However when the session is created, as per this image below, the session
expiry is still 'session' instead of the time I set, which should be
[image: Inline image 1]

Any help would be appreciated, even if I could create another session and
set the expiry or something but it all seems to point to something from
config.yml not being set in the session.

I've had a look at the cookie tests but I still can't figure out how to
work with cookies properly in Dancer2. The date I set should set the
session cookie to around 2130. I've also tried lower times with no effect.

Thanks a lot,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150820/35c125dc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 1454 bytes
Desc: not available
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150820/35c125dc/attachment.png>

More information about the dancer-users mailing list