Integrate with Sarathy.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index d5a343d..313cce7 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4798,12 +4798,13 @@ Perl_ck_fun(pTHX_ OP *o)
                    char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
                    OP *newop = newAVREF(newGVOP(OP_GV, 0,
                        gv_fetchpv(name, TRUE, SVt_PVAV) ));
-                   if (ckWARN(WARN_SYNTAX))
 #ifdef IV_IS_QUAD
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Array @%s missing the @ in argument %" PERL_PRId64 " of %s()",
                            name, (IV)numargs, PL_op_desc[type]);
 #else
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Array @%s missing the @ in argument %ld of %s()",
                            name, (long)numargs, PL_op_desc[type]);
@@ -4824,12 +4825,13 @@ Perl_ck_fun(pTHX_ OP *o)
                    char *name = SvPVx(((SVOP*)kid)->op_sv, n_a);
                    OP *newop = newHVREF(newGVOP(OP_GV, 0,
                        gv_fetchpv(name, TRUE, SVt_PVHV) ));
-                   if (ckWARN(WARN_SYNTAX))
 #ifdef IV_IS_QUAD
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Hash %%%s missing the %% in argument %" PERL_PRId64 " of %s()",
                            name, (IV)numargs, PL_op_desc[type]);
 #else
+                   if (ckWARN(WARN_SYNTAX))
                        Perl_warner(aTHX_ WARN_SYNTAX,
                            "Hash %%%s missing the %% in argument %ld of %s()",
                            name, (long)numargs, PL_op_desc[type]);
@@ -5135,7 +5137,9 @@ Perl_ck_sassign(pTHX_ OP *o)
        OP *kkid = kid->op_sibling;
 
        /* Can just relocate the target. */
-       if (kkid && kkid->op_type == OP_PADSV) {
+       if (kkid && kkid->op_type == OP_PADSV
+           && !(kkid->op_private & OPpLVAL_INTRO))
+       {
            /* Concat has problems if target is equal to right arg. */
            if (kid->op_type == OP_CONCAT
                && kLISTOP->op_first->op_sibling->op_type == OP_PADSV
@@ -5707,6 +5711,7 @@ Perl_peep(pTHX_ register OP *o)
                        goto ignore_optimization;
                    } else {
                        o->op_targ = o->op_next->op_targ;
+                       o->op_private |= OPpTARGET_MY;
                    }
                }
                null(o->op_next);
@@ -5791,6 +5796,8 @@ Perl_peep(pTHX_ register OP *o)
        case OP_GREPWHILE:
        case OP_AND:
        case OP_OR:
+       case OP_ANDASSIGN:
+       case OP_ORASSIGN:
        case OP_COND_EXPR:
        case OP_RANGE:
            o->op_seq = PL_op_seqmax++;