X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCGI%2FCarp.pm;h=0a5c1218eee372ffc25b8e83271b54a7b27415b3;hb=3d1a2ec4907585a079fab9dc4764c16e7e3b58e3;hp=90e9552c75c9613f5b1c48f7bfa4ff84bf4f5493;hpb=f3248e5040f8dfad4ae7c7de65d22997a0107c5f;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/CGI/Carp.pm b/lib/CGI/Carp.pm index 90e9552..0a5c121 100644 --- a/lib/CGI/Carp.pm +++ b/lib/CGI/Carp.pm @@ -194,14 +194,14 @@ use Carp; BEGIN { $] >= 5.005 - ? eval q#sub ineval { $^S }# - : eval q#sub ineval { _longmess() =~ /eval [\{\']/m }#; + ? eval q#sub ineval { defined $^S ? $^S : _longmess() =~ /eval [\{\']/m }# + : eval q#sub ineval { _longmess() =~ /eval [\{\']/m }#; $@ and die; } $main::SIG{__WARN__}=\&CGI::Carp::warn; $main::SIG{__DIE__}=\&CGI::Carp::die; -$CGI::Carp::VERSION = '1.14'; +$CGI::Carp::VERSION = '1.16'; $CGI::Carp::CUSTOM_MSG = undef; # fancy import routine detects and handles 'errorWrap' specially. @@ -335,8 +335,7 @@ $outer_message END ; - if ($mod_perl) { - my $r = Apache->request; + if ($mod_perl && (my $r = Apache->request)) { # If bytes have already been sent, then # we print the message out directly. # Otherwise we make a custom error