You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Oskar Ahner <os...@osz.nu> on 2007/01/10 18:46:09 UTC
Re: Exit frustration
Gerald Richter skrev:
>> [$ var $dummy $]
>> [- # Just clear the user session information to leave cleanly, inform
>> # the user he has logged out, and redirect to the login screen
>> delete $udat{login};
>> delete $udat{passwd};
>> $epreq->{warnings}->add_msg('Su sesión ha finalizado');
>> $epreq->{webclient}->redirect('login.html');
>> -]
>>
>> (of course, $epreq->{webclient} is an instantiated
>> SmbGate::Embperl::WebClient, invoked at base.pm's init)
>>
>>
>
> 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.
>
Hi All!
Isn't emberl running under mod_perl? If so, the mod_perl, will override
the exit() call with its own version of exit which does not kill the
perl interpreter.
Am i totally wrong here?
Oskar Ahner
> The main problem will be, that this will exit the whole request and you
> didn't have set the headers for redirect so far
>
> So the question is where do you set your http headers?
>
>
>> You will notice I'm using $epreq to hold my various objects
>> so they are available along the way - I lack a better way of
>> doing this, you might also point me out to another way of
>> doing this :)
>>
>
> $epreq is a perfect place for storing such things
>
> Gerald
>
>
>
>
> ** Virus checked by BB-5000 Mailfilter **
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org