in reply to Strategies for exiting early for CGI::Application based webapp.

Can you not just write a safe_exit() routine to call instead of exit?
  • Comment on Re: Strategies for exiting early for CGI::Application based webapp.
  • Download Code

Replies are listed 'Best First'.
Re: Re: Strategies for exiting early for CGI::Application based webapp.
by EvdB (Deacon) on Oct 22, 2003 at 15:01 UTC
    I suppose that I could but my intention is to not muck around too much with the internals of CGI::Application. Are you suggesting something like:
    sub safe_exit { my $self = shift; $self->teardown(); # Include other functions that should be run here. exit; }

    --tidiness is the memory loss of environmental mnemonics

      It is just another run mode, it issues only a redirect; teardown method will be called by CGI::Application itself. Also remember that you need to save any parameter that was passed along with the original request.

      Ciao, Valerio