I guess in session('key'), session is a DSL method. internally, it calls the session->read($key) for you.<br><br><div class="gmail_quote">On Sun, Mar 17, 2013 at 10:07 AM, Octavian Rasnita <span dir="ltr"><<a href="mailto:orasnita@gmail.com" target="_blank">orasnita@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I read that we can use both:<br>
<br>
session('key')<br>
and<br>
session->{key}<br>
<br>
...in order to get a value from the session.<br>
<br>
I tried:<br>
<br>
template 'login', { message => session->{flash} };<br>
<br>
but it didn't work. However, the following worked:<br>
<br>
template 'login', { message => session('flash') };<br>
<br>
--Octavian<br>
<br>
______________________________<u></u>_________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm" target="_blank">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/<u></u>mailman/listinfo/dancer-users</a><br>
</blockquote></div><br>