constant folding on the range operator had the effect of disabling
peephole optimizations in all the siblings of the range OP; the
effect of this was that barewords could escape strictures when
they were hiding in such places
p4raw-link: @14778 on //depot/maint-5.6/perl:
0ef6625236721d79a74c662bb0d14b11d0d775c2
p4raw-id: //depot/perl@14791
p4raw-integrated: from //depot/maint-5.6/perl@14790 'merge in' op.c
(@14439..)
o->op_type = OP_RV2AV;
o->op_ppaddr = PL_ppaddr[OP_RV2AV];
+ o->op_seq = 0; /* needs to be revisited in peep() */
curop = ((UNOP*)o)->op_first;
((UNOP*)o)->op_first = newSVOP(OP_CONST, 0, SvREFCNT_inc(*PL_stack_sp--));
op_free(curop);
# strict subs - error
use strict 'subs' ;
+my @a = (1..2);
+my $b = xyz;
+EXPECT
+Bareword "xyz" not allowed while "strict subs" in use at - line 5.
+Execution of - aborted due to compilation errors.
+########
+
+# strict subs - error
+use strict 'subs' ;
Fred ;
EXPECT
Bareword "Fred" not allowed while "strict subs" in use at - line 4.