Hi all,

what is the right way to manage session in a before hook?
I need to write a session key during the before hook execution, to
retrieve it in dispatcher (to render the value).
I tried many ways like:

hook before => sub {
    my $context = shift;
...

session 'foo' => 'bar';

$context->app->session->{'foo'} = 'bar';

$session = $context->session;
$session->write('foo', 'bar')

}


but everytime nothing arrives to the dispatcher and nothing is actually
written (I used Session::YAML to test this).

Where am I wrong?


-- 
Cymon
Coniglio domina,
http://www.therabbit.it
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to