diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-01-12 15:40:53 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2006-01-12 15:40:53 +0000 |
commit | 54dc0f912bb497a6d6861fbfa3f067ec3cfdfe0c (patch) | |
tree | ea0f085b0ad47fa73e33cfd1b3d15220c2e45a15 | |
parent | 764289d88134dd8424d60ca15744b687b335cc99 (diff) | |
download | perl-54dc0f912bb497a6d6861fbfa3f067ec3cfdfe0c.tar.gz |
Don't warn when localizing $[
p4raw-id: //depot/perl@26803
-rw-r--r-- | op.c | 1 | ||||
-rw-r--r-- | t/lib/warnings/op | 1 |
2 files changed, 2 insertions, 0 deletions
@@ -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 ca92412d62..4f00c12258 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 |