summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorSlaven Rezić <slaven@rezic.de>2018-02-11 12:36:07 -0800
committerFather Chrysostomos <sprout@cpan.org>2018-02-11 12:40:36 -0800
commit25ebbc22701a587d60124611ae3b072d2d47883a (patch)
tree752d92c46f781f820519840c0628fccc799fc80c /lib
parent5b95d1b1b5e7cb1ddfe987a377507d21b7d91587 (diff)
downloadperl-25ebbc22701a587d60124611ae3b072d2d47883a.tar.gz
warnings: Omit handle when $. is 0
otherwise the new _at_level functions end up including ‘at <handle> line 0’. [Commit message by the committer.]
Diffstat (limited to 'lib')
-rw-r--r--lib/warnings.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/warnings.pm b/lib/warnings.pm
index ea88daf891..911c5aad5a 100644
--- a/lib/warnings.pm
+++ b/lib/warnings.pm
@@ -448,7 +448,7 @@ sub __chk
# If we have an explicit level, bypass Carp.
if ($has_level and @callers_bitmask) {
my $stuff = " at " . join " line ", (caller $i)[1,2];
- $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if ${^LAST_FH};
+ $stuff .= ", <" . *${^LAST_FH}{NAME} . "> line $." if $. && ${^LAST_FH};
die "$message$stuff.\n" if $results[0];
return warn "$message$stuff.\n";
}