nathaniels has asked for the wisdom of the Perl Monks concerning the following question:
Hello All,
I seem to be unable to create/set cookies using Dancer. I'm sure I'm missing something small. Here's the code:
any ['get', 'post'] => '/viewscript' => sub { set_cookie name => 'return_page', value => '/viewscript'; if ( request->is_get() ) { forward "/selectscript"; } } any ['get', 'post'] => '/selectscript' => sub { my $return_page = cookies->{ return_page }; print $return_page; }
Thanks for the help!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Dancer Cookies
by Anonymous Monk on Nov 13, 2013 at 03:36 UTC | |
by nathaniels (Acolyte) on Nov 13, 2013 at 03:50 UTC | |
by Anonymous Monk on Nov 13, 2013 at 03:53 UTC | |
by nathaniels (Acolyte) on Nov 13, 2013 at 04:01 UTC | |
by Anonymous Monk on Nov 13, 2013 at 08:00 UTC |