otherwise the new _at_level functions end up including
‘at <handle> line 0’.
[Commit message by the committer.]
# 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";
}
# 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";
}