Upgrade to Pod-Simple-3.04
[p5sagit/p5-mst-13.2.git] / op.c
diff --git a/op.c b/op.c
index 6ef7a50..966cf84 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1157,9 +1157,8 @@ Perl_mod(pTHX_ OP *o, I32 type)
        /* FALL THROUGH */
     default:
       nomod:
-       /* grep, foreach, subcalls, refgen, m//g */
-       if (type == OP_GREPSTART || type == OP_ENTERSUB || type == OP_REFGEN
-           || type == OP_MATCH)
+       /* grep, foreach, subcalls, refgen */
+       if (type == OP_GREPSTART || type == OP_ENTERSUB || type == OP_REFGEN)
            break;
        yyerror(Perl_form(aTHX_ "Can't modify %s in %s",
                     (o->op_type == OP_NULL && (o->op_flags & OPf_SPECIAL)
@@ -1841,14 +1840,9 @@ Perl_bind_match(pTHX_ I32 type, OP *left, OP *right)
     }
     if (!(right->op_flags & OPf_STACKED) && ismatchop) {
        right->op_flags |= OPf_STACKED;
-       /* s/// and tr/// modify their arg.
-        * m//g also indirectly modifies the arg by setting pos magic on it */
-       if (   (right->op_type == OP_MATCH &&
-                   (cPMOPx(right)->op_pmflags & PMf_GLOBAL))
-           || (right->op_type == OP_SUBST)
-           || (right->op_type == OP_TRANS &&
-               ! (right->op_private & OPpTRANS_IDENTICAL))
-       )
+       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);
@@ -4724,7 +4718,7 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
        const char * const tname = (name ? name : aname);
 
        if (PERLDB_SUBLINE && PL_curstash != PL_debstash) {
-           SV * const sv = NEWSV(0,0);
+           SV * const sv = newSV(0);
            SV * const tmpstr = sv_newmortal();
            GV * const db_postponed = gv_fetchpv("DB::postponed", GV_ADDMULTI, SVt_PVHV);
            HV *hv;
@@ -4908,7 +4902,7 @@ Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename)
     if (cv)                            /* must reuse cv if autoloaded */
        cv_undef(cv);
     else {
-       cv = (CV*)NEWSV(1105,0);
+       cv = (CV*)newSV(0);
        sv_upgrade((SV *)cv, SVt_PVCV);
        if (name) {
            GvCV(gv) = cv;