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

You could use a goto and make your way down to the bottom of the routine. I've done that in the past.

--t. alex
Life is short: get busy!
  • 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:04 UTC
    All of CGI::Appliations juicy bits happen inside the routine run. Where would you have the goto point to - bearing in mind I don't want to modify CGI::Application?

    --tidiness is the memory loss of environmental mnemonics

Re: Re: Strategies for exiting early for CGI::Application based webapp.
by talexb (Chancellor) on Oct 22, 2003 at 16:14 UTC

    The code that I'm imagining would be something like

    { if cookie not found { redirect to login page; goto CLEAN_UP; } ... CLEAN_UP: do_some_clean_up(); }
    So this could be a sub-routine or a code reference.

    Does that answer your question?

    --t. alex
    Life is short: get busy!