You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Brian Lavender <br...@brie.com> on 2002/03/14 04:07:18 UTC

Exiting a script, or how do you do exit?

I developing some code, which I am running under

Apache::Registry

I seem to recall that you don't want to put 

exit;

in a script, because the script continues to run. I have some
code, where I may send a redirect, and then I am done. Is there
a pseudo exit, or return command?

brian
-- 
Brian Lavender
http://www.brie.com/brian/

Re: Exiting a script, or how do you do exit?

Posted by Stas Bekman <st...@stason.org>.
Brian Lavender wrote:
> Found the FAQ's. Seems that I can put in  
> 
> goto END;
> 
> and then put an end block in the code.
> 
> END: {
>   1;
> }

no, you use exit() as is with Registry and Apache::exit with handlers. see:
http://perl.apache.org/guide/porting.html#Terminating_requests_and_process


> On Wed, Mar 13, 2002 at 07:07:18PM -0800, Brian Lavender wrote:
> 
>>I developing some code, which I am running under
>>
>>Apache::Registry
>>
>>I seem to recall that you don't want to put 
>>
>>exit;
>>
>>in a script, because the script continues to run. I have some
>>code, where I may send a redirect, and then I am done. Is there
>>a pseudo exit, or return command?
>>
>>brian
>>-- 
>>Brian Lavender
>>http://www.brie.com/brian/
>>
> 



-- 


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Re: Exiting a script, or how do you do exit?

Posted by Brian Lavender <br...@brie.com>.
Found the FAQ's. Seems that I can put in  

goto END;

and then put an end block in the code.

END: {
  1;
}

On Wed, Mar 13, 2002 at 07:07:18PM -0800, Brian Lavender wrote:
> I developing some code, which I am running under
> 
> Apache::Registry
> 
> I seem to recall that you don't want to put 
> 
> exit;
> 
> in a script, because the script continues to run. I have some
> code, where I may send a redirect, and then I am done. Is there
> a pseudo exit, or return command?
> 
> brian
> -- 
> Brian Lavender
> http://www.brie.com/brian/

-- 
Brian Lavender
http://www.brie.com/brian/