I get an uninitialized value error.
lwp-request outputs unitialized value error? That doesn't seem likely
I've had a chance to run your dancer code, aside from the typos, the problem seems that you're using an internal redirect (forward), and that doesn't set cookies (makes sense to me)
you want to do a proper http redirect, external redirect, use redirect instead of forward
dancer -a dncook ....
package dncook; use Dancer ':syntax'; our $VERSION = '0.1'; get '/' => sub { template 'index'; }; any ['get', 'post'] => '/viewscript' => sub { set_cookie name => 'return_page', value => '/viewscript'; redirect "/selectscript"; }; any ['get', 'post'] => '/selectscript' => sub { use Data::Dump qw/ pp /; return pp( cookies() ); }; true;
In reply to Re^5: Dancer Cookies (redirect instead of forward)
by Anonymous Monk
in thread Dancer Cookies
by nathaniels
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |