Update Changes.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index ec43cce..263f784 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1983,11 +1983,14 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
              desc, sample, sample);
     }
 
-    if (right->op_type == OP_MATCH ||
+    if (!(right->op_flags & OPf_STACKED) &&
+       (right->op_type == OP_MATCH ||
        right->op_type == OP_SUBST ||
-       right->op_type == OP_TRANS) {
+       right->op_type == OP_TRANS)) {
        right->op_flags |= OPf_STACKED;
-       if (right->op_type != OP_MATCH)
+       if (right->op_type != OP_MATCH &&
+            ! (right->op_type == OP_TRANS &&
+               right->op_private & OPpTRANS_IDENTICAL))
            left = mod(left, right->op_type);
        if (right->op_type == OP_TRANS)
            o = newBINOP(OP_NULL, OPf_STACKED, scalar(left), right);
@@ -5760,6 +5763,10 @@ Perl_ck_defined(pTHX_ OP *o)             /* 19990527 MJD */
     if ((o->op_flags & OPf_KIDS) && ckWARN(WARN_DEPRECATED)) {
        switch (cUNOPo->op_first->op_type) {
        case OP_RV2AV:
+           /* This is needed for
+              if (defined %stash::)
+              to work.   Do not break Tk.
+              */
            break;                      /* Globals via GV can be undef */ 
        case OP_PADAV:
        case OP_AASSIGN:                /* Is this a good idea? */
@@ -5769,6 +5776,10 @@ Perl_ck_defined(pTHX_ OP *o)             /* 19990527 MJD */
                        "\t(Maybe you should just omit the defined()?)\n");
        break;
        case OP_RV2HV:
+           /* This is needed for
+              if (defined %stash::)
+              to work.   Do not break Tk.
+              */
            break;                      /* Globals via GV can be undef */ 
        case OP_PADHV:
            Perl_warner(aTHX_ WARN_DEPRECATED,
@@ -6199,7 +6210,7 @@ Perl_ck_split(pTHX_ OP *o)
        cLISTOPo->op_last = kid; /* There was only one element previously */
     }
 
-    if (kid->op_type != OP_MATCH) {
+    if (kid->op_type != OP_MATCH || kid->op_flags & OPf_STACKED) {
        OP *sibl = kid->op_sibling;
        kid->op_sibling = 0;
        kid = pmruntime( newPMOP(OP_MATCH, OPf_SPECIAL), kid, Nullop);