[dancer-users] session->{} doesn't work?

David Golden xdg at xdg.me
Sun Mar 17 15:19:54 GMT 2013


In Dancer2, you can't access the session object data directly like that
anymore.

You can use the API described in Dancer2::Core::Session, though.

David
On Mar 17, 2013 11:08 AM, "Octavian Rasnita" <orasnita at gmail.com> wrote:

> Hi,
>
> I read that we can use both:
>
> session('key')
> and
> session->{key}
>
> ...in order to get a value from the session.
>
> I tried:
>
> template 'login', { message => session->{flash} };
>
> but it didn't work. However, the following worked:
>
> template 'login', { message => session('flash') };
>
> --Octavian
>
> ______________________________**_________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/**mailman/listinfo/dancer-users<http://lists.preshweb.co.uk/mailman/listinfo/dancer-users>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130317/6b690ca1/attachment.htm>


More information about the dancer-users mailing list