use 5.003_11;
use strict;
-$Safe::VERSION = "2.10";
+$Safe::VERSION = "2.10_01";
# *** Don't declare any lexicals above this point ***
#
}
use Carp;
+use Carp::Heavy;
use Opcode 1.01, qw(
opset opset_to_ops opmask_add
# each function call on the stack.
sub longmess {
- { local $@; require Carp::Heavy; } # XXX fix require to not clear $@?
+ {
+ local $@;
+ # XXX fix require to not clear $@?
+ # don't use require unless we need to (for Safe compartments)
+ require Carp::Heavy unless $INC{"Carp/Heavy.pm"};
+ }
# Icky backwards compatibility wrapper. :-(
my $call_pack = caller();
if ($Internal{$call_pack} or $CarpInternal{$call_pack}) {
# you always get a stack trace
sub shortmess { # Short-circuit &longmess if called via multiple packages
- { local $@; require Carp::Heavy; } # XXX fix require to not clear $@?
+ {
+ local $@;
+ # XXX fix require to not clear $@?
+ # don't use require unless we need to (for Safe compartments)
+ require Carp::Heavy unless $INC{"Carp/Heavy.pm"};
+ }
# Icky backwards compatibility wrapper. :-(
my $call_pack = caller();
local @CARP_NOT = caller();