summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cop.h4
-rw-r--r--op.c6
-rw-r--r--perly.c2
-rw-r--r--perly.y2
4 files changed, 5 insertions, 9 deletions
diff --git a/cop.h b/cop.h
index 829bbe83be..1fdd6d1845 100644
--- a/cop.h
+++ b/cop.h
@@ -129,8 +129,8 @@ struct block_loop {
};
#define PUSHLOOP(cx, ivar, s) \
- cx->blk_loop.label = PL_curcop->cop_label; \
- cx->blk_loop.resetsp = s - PL_stack_base; \
+ cx->blk_loop.label = PL_curcop->cop_label; \
+ cx->blk_loop.resetsp = s - PL_stack_base; \
cx->blk_loop.redo_op = cLOOP->op_redoop; \
cx->blk_loop.next_op = cLOOP->op_nextop; \
cx->blk_loop.last_op = cLOOP->op_lastop; \
diff --git a/op.c b/op.c
index a51ecb0722..acde88380a 100644
--- a/op.c
+++ b/op.c
@@ -1860,11 +1860,7 @@ Perl_scope(pTHX_ OP *o)
OP *kid;
o->op_type = OP_SCOPE;
o->op_ppaddr = PL_ppaddr[OP_SCOPE];
- kid = ((LISTOP*)o)->op_first;
- if (kid->op_type == OP_NEXTSTATE || kid->op_type == OP_DBSTATE){
- kid->op_type = OP_SETSTATE;
- kid->op_ppaddr = PL_ppaddr[OP_SETSTATE];
- }
+ null(((LISTOP*)o)->op_first);
}
else
o = newLISTOP(OP_SCOPE, 0, o, Nullop);
diff --git a/perly.c b/perly.c
index e1458d8ed3..9b619c9fcb 100644
--- a/perly.c
+++ b/perly.c
@@ -1662,7 +1662,7 @@ case 21:
break;
case 22:
#line 203 "perly.y"
-{ yyval.opval = scope(yyvsp[0].opval); }
+{ (yyvsp[0].opval)->op_flags |= OPf_PARENS; yyval.opval = scope(yyvsp[0].opval); }
break;
case 23:
#line 205 "perly.y"
diff --git a/perly.y b/perly.y
index ddc0efcb6d..c8163e135e 100644
--- a/perly.y
+++ b/perly.y
@@ -200,7 +200,7 @@ sideff : error
else : /* NULL */
{ $$ = Nullop; }
| ELSE mblock
- { $$ = scope($2); }
+ { ($2)->op_flags |= OPf_PARENS; $$ = scope($2); }
| ELSIF '(' mexpr ')' mblock else
{ PL_copline = $1;
$$ = newCONDOP(0, $3, scope($5), $6);