Use a block to limit it to just the invocation of caller.
package Carp;
-our $VERSION = '1.16';
+our $VERSION = '1.17';
our $MaxEvalLen = 0;
our $Verbose = 0;
sub caller_info {
my $i = shift(@_) + 1;
- package DB;
my %call_info;
+ {
+ package DB;
@call_info{
qw(pack file line sub has_args wantarray evaltext is_require)
} = defined &{"CORE::GLOBAL::caller"} ? &{"CORE::GLOBAL::caller"}($i) : caller($i);
+ }
unless (defined $call_info{pack}) {
return ();