From: Rafael Garcia-Suarez Date: Thu, 12 Jan 2006 15:40:53 +0000 (+0000) Subject: Don't warn when localizing $[ X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=54dc0f912bb497a6d6861fbfa3f067ec3cfdfe0c;p=p5sagit%2Fp5-mst-13.2.git Don't warn when localizing $[ p4raw-id: //depot/perl@26803 --- diff --git a/op.c b/op.c index 09f269a..6ef7a50 100644 --- a/op.c +++ b/op.c @@ -1037,6 +1037,7 @@ Perl_mod(pTHX_ OP *o, I32 type) case OP_CONST: if (!(o->op_private & (OPpCONST_ARYBASE))) goto nomod; + localize = 0; if (PL_eval_start && PL_eval_start->op_type == OP_CONST) { PL_compiling.cop_arybase = (I32)SvIV(cSVOPx(PL_eval_start)->op_sv); PL_eval_start = 0; diff --git a/t/lib/warnings/op b/t/lib/warnings/op index ca92412..4f00c12 100644 --- a/t/lib/warnings/op +++ b/t/lib/warnings/op @@ -1023,6 +1023,7 @@ local(pos($x)); # OP_POS local(vec($x,0,1)); # OP_VEC local($a[$b]); # OP_AELEM ok local($a{$b}); # OP_HELEM ok +local($[); # OP_CONST no warnings 'syntax'; EXPECT