[cgiapp] Redirecting with CGI::App Problem (possibly mod_perl
related)
Brad Van Sickle
bvs7085 at gmail.com
Fri Jun 5 00:25:23 EDT 2009
I'm running under mod_perl, not sure if that's relevant here or not... I
think it is because I've been able to get this working in a non-mod_perl
envrionment previously...
I'm attempting to validate a user's session in my cgi::app script. If
the session cookie is not present, or the session is invalid, I want to
redirect the user to the login module to get authenticated. The "order
of operations" document has a nice example of how to do this from within
init, but printing out the redirect headers and than issuing a die() to
prevent the rest of the operations from executing.
This does not work for me. As soon as that die executes my script fails
with the error:
Error executing class callback in init stage: Died at blah blah blah
my code:
if (!$ValidSession)
{
use CGI::Application::Plugin::Redirect;
$self->teardown();
print $self->redirect($FailureLocation);
die;
}
I've read every bit of documentation I can find and tried everything I can think of... I could really use some suggestions at this point.
Thanks!
More information about the cgiapp
mailing list