[Dancer-users] Return after redirect
Juan J. Martínez
reidrac at usebox.net
Fri Apr 9 14:04:49 UTC 2010
Hello,
Sometimes I need to redirect to another page after testing things, and I
want to leave the route ASAP, so I do something like:
get '/test' => sub {
if(params->{whatever})
{
redirect '/';
return;
}
"Other stuff, blah";
};
get '/' => sub {
template 'index';
};
I've switched to the dev branch, and that return after the redirect
results in following error:
Use of uninitialized value $line in length
at ../local/HTTP/Server/Simple/PSGI.pm line 137.
My question is: am I doing it right using return to leave the handler?
Cheers,
Juanjo
--
jjm's home: http://www.usebox.net/jjm/
blackshell: http://blackshell.usebox.net/
ramble on: http://rambleon.usebox.net/
More information about the Dancer-users
mailing list