remove spurious newSTATEOP() that causes goto to enter one too many
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index eb4a0ed..b605e66 100644 (file)
--- a/op.c
+++ b/op.c
@@ -677,7 +677,7 @@ Perl_op_free(pTHX_ OP *o)
 #endif /* USE_THREADS */
     default:
        if (!(o->op_flags & OPf_REF)
-           || (PL_check[o->op_type] != FUNC_NAME_TO_PTR(Perl_ck_ftst)))
+           || (PL_check[o->op_type] != MEMBER_TO_FPTR(Perl_ck_ftst)))
            break;
        /* FALL THROUGH */
     case OP_GVSV:
@@ -5548,6 +5548,8 @@ Perl_ck_subr(pTHX_ OP *o)
                case '$':
                    if (o2->op_type != OP_RV2SV
                        && o2->op_type != OP_PADSV
+                       && o2->op_type != OP_HELEM
+                       && o2->op_type != OP_AELEM
                        && o2->op_type != OP_THREADSV)
                    {
                        bad_type(arg, "scalar", gv_ename(namegv), o2);
@@ -5650,17 +5652,21 @@ Perl_peep(pTHX_ register OP *o)
            if (cSVOPo->op_private & OPpCONST_STRICT)
                no_bareword_allowed(o);
            /* FALL THROUGH */
-       case OP_CONCAT:
-       case OP_JOIN:
        case OP_UC:
        case OP_UCFIRST:
        case OP_LC:
        case OP_LCFIRST:
+           if ( o->op_next && o->op_next->op_type == OP_STRINGIFY
+                && !(o->op_next->op_private & OPpTARGET_MY) )
+               null(o->op_next);
+           o->op_seq = PL_op_seqmax++;
+           break;
+       case OP_CONCAT:
+       case OP_JOIN:
        case OP_QUOTEMETA:
            if (o->op_next && o->op_next->op_type == OP_STRINGIFY) {
                if (o->op_next->op_private & OPpTARGET_MY) {
-                   if ((o->op_type == OP_CONST) /* no target */
-                       || (o->op_flags & OPf_STACKED) /* chained concats */
+                   if ((o->op_flags & OPf_STACKED) /* chained concats */
                        || (o->op_type == OP_CONCAT
            /* Concat has problems if target is equal to right arg. */
                            && (((LISTOP*)o)->op_first->op_sibling->op_type