CGI-Carp-Throw

 view release on metacpan or  search on metacpan

lib/CGI/Carp/Throw.pm  view on Meta::CPAN

{
no warnings 'redefine';

#####################################################################
# Partially replace fatalsToBrowser so that it gets called
# unless the exception came from one of our throw_browser routines.
#####################################################################
*CGI::Carp::fatalsToBrowser = sub {
  my $msg = shift;
  
  my($pack,undef,undef,$sub) = caller(2);
  if (($sub || '') =~ /::_throw_browser$/) {
    die_msg_io($msg);
  }
  else {
    $old_fatals_to_browser->($msg)
  }
};
}

#####################################################################



( run in 0.279 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )