in reply to CGI::Application cgi_prerun exception handling
package My::App; use strict; use warnings; use base qw(CGI::Application); use CGI::Application::Plugin::DebugMessage; $_ = My::App->new; $_->debug('Abandon Ship!'); $_->run; sub cgiapp_init { my $self = shift; $self->mode_param('rm'); $self->run_modes([ 'login', 'AUTOLOAD' ]); } sub cgiapp_prerun { my ( $this, $rm ) = @_; eval { do { (); } }; if ($@) { $_->debug('Abandon Ship!'); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI::Application cgi_prerun exception handling
by morgon (Priest) on Jan 02, 2011 at 06:47 UTC |