# number of call levels to go back, so calls to longmess were off
# by one. Other code began calling longmess and expecting this
# behaviour, so the replacement has to emulate that behaviour.
- my $call_pack = caller();
+ my $call_pack = exists $CORE::GLOBAL::{caller} ? $CORE::GLOBAL::{caller}->() : caller();
if ($Internal{$call_pack} or $CarpInternal{$call_pack}) {
return longmess_heavy(@_);
}
sub shortmess {
# Icky backwards compatibility wrapper. :-(
- local @CARP_NOT = caller();
+ local @CARP_NOT = exists $CORE::GLOBAL::{caller} ? $CORE::GLOBAL::{caller}->() : caller();
shortmess_heavy(@_);
};
my %call_info;
@call_info{
qw(pack file line sub has_args wantarray evaltext is_require)
- } = caller($i);
+ } = exists $CORE::GLOBAL::{caller} ? $CORE::GLOBAL::{caller}->($i) : caller($i);
unless (defined $call_info{pack}) {
return ();
my $i;
my $lvl = $CarpLevel;
{
- my $pkg = caller(++$i);
+ ++$i;
+ my $pkg = exists $CORE::GLOBAL::{caller} ? $CORE::GLOBAL::{caller}->($i) : caller($i);
unless(defined($pkg)) {
# This *shouldn't* happen.
if (%Internal) {
my $i = 1;
my $lvl = $CarpLevel;
{
- my $called = caller($i++);
- my $caller = caller($i);
+
+ my $called = exists $CORE::GLOBAL::{caller} ? $CORE::GLOBAL::{caller}->($i) : caller($i);
+ $i++;
+ my $caller = exists $CORE::GLOBAL::{caller} ? $CORE::GLOBAL::{caller}->($i) : caller($i);
return 0 unless defined($caller); # What happened?
redo if $Internal{$caller};