in reply to CGI::Application cgi_prerun exception handling

Create a base class for your applications and override run, then inherit from this base class
package MyBase::CGIapp; use parent qw' CGI::Application '; sub run { my( $self ) = shift; ## pseudo code my $ret = eval { $self->SUPER::run(@_); }; while( $@ ){ $ret = eval { $self->handle_exeption }; last if $ret ; } return $ret; }
Run calls all the other methods, cgiapp_prerun....