summaryrefslogtreecommitdiff
path: root/lib/CGI/Carp.pm
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-05-01 08:16:10 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-05-01 08:16:10 +0000
commit3d1a2ec4907585a079fab9dc4764c16e7e3b58e3 (patch)
tree46ef1a6088ba0cdfe8bf4b813c7c5254f40f17a2 /lib/CGI/Carp.pm
parentf3248e5040f8dfad4ae7c7de65d22997a0107c5f (diff)
downloadperl-3d1a2ec4907585a079fab9dc4764c16e7e3b58e3.tar.gz
add CGI.pm v2.66 (from Lincoln Stein)
p4raw-id: //depot/perl@6029
Diffstat (limited to 'lib/CGI/Carp.pm')
-rw-r--r--lib/CGI/Carp.pm9
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/CGI/Carp.pm b/lib/CGI/Carp.pm
index 90e9552c75..0a5c1218ee 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