This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c369a25
)
Use $^S instead of caller in splain
author
Father Chrysostomos
<sprout@cpan.org>
Sun, 29 Jul 2012 07:03:45 +0000
(
00:03
-0700)
committer
Father Chrysostomos
<sprout@cpan.org>
Sun, 29 Jul 2012 07:14:08 +0000
(
00:14
-0700)
lib/diagnostics.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/diagnostics.pm
b/lib/diagnostics.pm
index
82fa700
..
c734c85
100644
(file)
--- a/
lib/diagnostics.pm
+++ b/
lib/diagnostics.pm
@@
-546,14
+546,7
@@
sub death_trap {
# See if we are coming from anywhere within an eval. If so we don't
# want to explain the exception because it's going to get caught.
- my $in_eval = 0;
- my $i = 0;
- while (my $caller = (caller($i++))[3]) {
- if ($caller eq '(eval)') {
- $in_eval = 1;
- last;
- }
- }
+ my $in_eval = $^S || !defined $^S;
splainthis($exception) unless $in_eval;
if (caller eq $WHOAMI) { print STDERR "INTERNAL EXCEPTION: $exception"; }