if (!block)
block = newOP(OP_NULL, 0);
+ else if (cont) {
+ block = scope(block);
+ }
if (cont)
next = LINKLIST(cont);
if (cxix < cxstack_ix)
dounwind(cxix);
- TOPBLOCK(cx);
+ cx = &cxstack[cxstack_ix];
{
OP *nextop = cx->blk_loop.next_op;
/* clean scope, but only if there's no continue block */
if (nextop == cUNOPx(cx->blk_loop.last_op)->op_first->op_next) {
+ TOPBLOCK(cx);
oldsave = PL_scopestack[PL_scopestack_ix - 1];
LEAVE_SCOPE(oldsave);
}
#!./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";
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"
+ }
+}