summaryrefslogtreecommitdiff
path: root/lib/Carp.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Carp.pm')
-rw-r--r--lib/Carp.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm
index b2e634ca5f..d2854c090e 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -226,8 +226,8 @@ sub export_fail {
sub longmess {
{
- local $@;
- # XXX fix require to not clear $@?
+ local($@, $!);
+ # XXX fix require to not clear $@ or $!?
# don't use require unless we need to (for Safe compartments)
require Carp::Heavy unless $INC{"Carp/Heavy.pm"};
}
@@ -251,8 +251,8 @@ sub longmess {
sub shortmess { # Short-circuit &longmess if called via multiple packages
{
- local $@;
- # XXX fix require to not clear $@?
+ local($@, $!);
+ # XXX fix require to not clear $@ or $!?
# don't use require unless we need to (for Safe compartments)
require Carp::Heavy unless $INC{"Carp/Heavy.pm"};
}