summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorGraham Knop <haarg@haarg.org>2020-11-23 23:12:49 +0100
committerKarl Williamson <khw@cpan.org>2020-11-23 15:26:56 -0700
commit42f8d732ff160bd4f03b0fd75c8ccd1592abbf85 (patch)
tree5d719e10d07007f1664a14289a0480584b270d1c /dist
parent428e0112db0c53f7d112599f1faec39df3c543cf (diff)
downloadperl-42f8d732ff160bd4f03b0fd75c8ccd1592abbf85.tar.gz
fix context of caller call in Carp
Carp's CARP_NOT variable is meant to have package names. caller in list context returns the calling file and line in addition to the package name. Enforce scalar context on the call to caller to fix this.
Diffstat (limited to 'dist')
-rw-r--r--dist/Carp/lib/Carp.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/Carp/lib/Carp.pm b/dist/Carp/lib/Carp.pm
index 109b7fec77..46aeaa5ffa 100644
--- a/dist/Carp/lib/Carp.pm
+++ b/dist/Carp/lib/Carp.pm
@@ -284,7 +284,7 @@ sub shortmess {
my $cgc = _cgc();
# Icky backwards compatibility wrapper. :-(
- local @CARP_NOT = $cgc ? $cgc->() : caller();
+ local @CARP_NOT = scalar( $cgc ? $cgc->() : caller() );
shortmess_heavy(@_);
}