Don't warn when localizing $[
Rafael Garcia-Suarez [Thu, 12 Jan 2006 15:40:53 +0000 (15:40 +0000)]
p4raw-id: //depot/perl@26803

op.c
t/lib/warnings/op

diff --git a/op.c b/op.c
index 09f269a..6ef7a50 100644 (file)
--- 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;
index ca92412..4f00c12 100644 (file)
@@ -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