summaryrefslogtreecommitdiff
path: root/t/op
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-07-12 02:11:16 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-07-12 02:11:16 +0000
commit2c375eb932f2eb03c0f34b2cbba1ce81b7ff1b59 (patch)
tree11e91ed41e624d272b20d28e755565438ed59d92 /t/op
parent2cd61cdbd64958437da8294b84109bc8b63ab360 (diff)
downloadperl-2c375eb932f2eb03c0f34b2cbba1ce81b7ff1b59.tar.gz
fix pp_caller() to fully traverse stacklevels
p4raw-id: //depot/perl@1445
Diffstat (limited to 't/op')
-rwxr-xr-xt/op/runlevel.t22
1 files changed, 21 insertions, 1 deletions
diff --git a/t/op/runlevel.t b/t/op/runlevel.t
index bff26e4b71..307e2a0bb5 100755
--- a/t/op/runlevel.t
+++ b/t/op/runlevel.t
@@ -23,7 +23,7 @@ $tmpfile = "runltmp000";
END { if ($tmpfile) { 1 while unlink $tmpfile; } }
for (@prgs){
- my $switch;
+ my $switch = "";
if (s/^\s*(-\w+)//){
$switch = $1;
}
@@ -295,3 +295,23 @@ foo:
END { print "foobar\n" }
EXPECT
foobar
+########
+$SIG{__DIE__} = sub {
+ print "In DIE\n";
+ $i = 0;
+ while (($p,$f,$l,$s) = caller(++$i)) {
+ print "$p|$f|$l|$s\n";
+ }
+};
+eval { die };
+&{sub { eval 'die' }}();
+sub foo { eval { die } } foo();
+EXPECT
+In DIE
+main|-|8|(eval)
+In DIE
+main|-|9|(eval)
+main|-|9|main::__ANON__
+In DIE
+main|-|10|(eval)
+main|-|10|main::foo