summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-07-21 13:56:53 +0100
committerNicholas Clark <nick@ccl4.org>2010-07-21 13:56:53 +0100
commit067bb83c81c90d49b193f506de7fb39006f8b3c2 (patch)
treed34e8affd278f429871c094f46e6514a06f87fbc /lib
parent5b235299a82969c391c126a8d9a1475362a595a6 (diff)
downloadperl-067bb83c81c90d49b193f506de7fb39006f8b3c2.tar.gz
In Carp, minimise the amount of code running in package DB.
Use a block to limit it to just the invocation of caller.
Diffstat (limited to 'lib')
-rw-r--r--lib/Carp.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Carp.pm b/lib/Carp.pm
index a08ff0fb19..add42d27fe 100644
--- a/lib/Carp.pm
+++ b/lib/Carp.pm
@@ -1,6 +1,6 @@
package Carp;
-our $VERSION = '1.16';
+our $VERSION = '1.17';
our $MaxEvalLen = 0;
our $Verbose = 0;
@@ -66,11 +66,13 @@ sub cluck { warn longmess @_ }
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 ();