summaryrefslogtreecommitdiff
path: root/t/op/eval.t
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1999-02-28 21:12:22 +0000
committerGurusamy Sarathy <gsar@cpan.org>1999-02-28 21:12:22 +0000
commit2680586ee66b8de4d2b5f26a2013220f2bec9d5f (patch)
treedce0c6347c8a0e842bc43bc34efbccc3fd44acfe /t/op/eval.t
parent3467312b2d3ee442c007c093aaf0becc72151b00 (diff)
downloadperl-2680586ee66b8de4d2b5f26a2013220f2bec9d5f.tar.gz
fix longstanding bug: searches for lexicals originating within eval''
weren't stopping at the subroutine boundary correctly p4raw-id: //depot/perl@3037
Diffstat (limited to 't/op/eval.t')
-rwxr-xr-xt/op/eval.t13
1 files changed, 12 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t
index 498c63aaf3..5822797a6c 100755
--- a/t/op/eval.t
+++ b/t/op/eval.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..29\n";
+print "1..30\n";
eval 'print "ok 1\n";';
@@ -129,3 +129,14 @@ eval <<'EOT';
}
EOT
create_closure("ok $x\n")->();
+$x++;
+
+# does lexical search terminate correctly at subroutine boundary?
+$main::r = "ok $x\n";
+sub terminal { eval 'print $r' }
+{
+ my $r = "not ok $x\n";
+ eval 'terminal($r)';
+}
+$x++;
+