diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-23 08:17:30 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-01-23 08:17:30 +0000 |
commit | 872465582bf743a066e1240f2c3e941735674827 (patch) | |
tree | 213664ae2c9b0a4f594b57eee46b5b4d457738aa /t/cmd | |
parent | 1ee987245c095afd177d3e2ca6255cec8dbb53ca (diff) | |
download | perl-872465582bf743a066e1240f2c3e941735674827.tar.gz |
fix localization in while BLOCK when there is a continue BLOCK
by introducing an explicit scope (c.f. change#4848)
p4raw-link: @4848 on //depot/perl: 1ee987245c095afd177d3e2ca6255cec8dbb53ca
p4raw-id: //depot/perl@4849
Diffstat (limited to 't/cmd')
-rwxr-xr-x | t/cmd/while.t | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/t/cmd/while.t b/t/cmd/while.t index 515a7b6f9e..46bbdea15a 100755 --- a/t/cmd/while.t +++ b/t/cmd/while.t @@ -1,8 +1,6 @@ #!./perl -# $RCSfile: while.t,v $$Revision: 4.1 $$Date: 92/08/07 18:27:15 $ - -print "1..17\n"; +print "1..19\n"; open (tmp,'>Cmd_while.tmp') || die "Can't create Cmd_while.tmp."; print tmp "tvi925\n"; @@ -141,3 +139,24 @@ print "ok $i\n"; print "ok ", $var-1, "\nok $i\n"; } } + +{ + local $l = 18; + { + local $l = 0 + } + continue { + print "ok $l\n" + } +} + +{ + local $l = 19; + my $x = 0; + while (!$x++) { + local $l = 0 + } + continue { + print "ok $l\n" + } +} |