Upgrade to Test::Harness 2.38.
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 6dc36ca..5823974 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4213,6 +4213,11 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
                             mod(scalarseq(block), OP_LEAVESUBLV));
     }
     else {
+       /* This makes sub {}; work as expected.  */
+       if (block->op_type == OP_STUB) {
+           op_free(block);
+           block = newSTATEOP(0, Nullch, 0);
+       }
        CvROOT(cv) = newUNOP(OP_LEAVESUB, 0, scalarseq(block));
     }
     CvROOT(cv)->op_private |= OPpREFCOUNTED;
@@ -6259,23 +6264,6 @@ Perl_peep(pTHX_ register OP *o)
            o->op_seq = PL_op_seqmax++;
            break;
 
-       case OP_CONCAT:
-           if (o->op_next && o->op_next->op_type == OP_STRINGIFY) {
-               if (o->op_next->op_private & OPpTARGET_MY) {
-                   if (o->op_flags & OPf_STACKED) /* chained concats */
-                       goto ignore_optimization;
-                   else {
-                       /* assert(PL_opargs[o->op_type] & OA_TARGLEX); */
-                       o->op_targ = o->op_next->op_targ;
-                       o->op_next->op_targ = 0;
-                       o->op_private |= OPpTARGET_MY;
-                   }
-               }
-               op_null(o->op_next);
-           }
-         ignore_optimization:
-           o->op_seq = PL_op_seqmax++;
-           break;
        case OP_STUB:
            if ((o->op_flags & OPf_WANT) != OPf_WANT_LIST) {
                o->op_seq = PL_op_seqmax++;