Gunnar Wolf skrev:
Oskar Ahner dijo [Wed, Jan 10, 2007 at 06:52:34PM +0100]:
In your module, you should call Embperl::exit (301) instead of just exit,
because calling exit only, will terminate the whole Apache child, which is
not what you want.
Ok, changed to Embperl::Exit - Now I get yet another message logged!
:-)
Do You have to call exit() at all? If You just finnish your code with the redirection statement? I do so in my app where the redirection is the last statement of execution.

Umh... I understand that "clean" is very subjective, but it's cleaner
for me sometimes to exit this way. In this specific case, I'm calling
exit from my redirect method, in order to _avoid_ going through the
rest of the logic - i.e., at user authentication time, if the user is
not successfully authenticated, from the Embperl base.pm's init
method, I just call $epreq->{webclient}->redirect('login.html'), and
that's it.
Ok, I didn't mean it to do it uncleanly :-) I was thinking about a solution where a "message" can be passed between the different phases (like $r->notes in mod_perl). In such a case You can set a flag to indicate failure for instance, and all other sub routines check for this status flag. Btw, are You coding your authentication mechanism in embperl or mod perl? I tried to do it in embperl but ended up in mod perl by it it's "lower level nature".
But I'm interrested in authentication modules written purley in embperl.

Regards,
Oskar

Greetings,



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to