Remove OPpENTERSUB_NOMOD.
authorGerard Goossen <gerard@ggoossen.net>
Sat, 13 Aug 2011 16:51:48 +0000 (18:51 +0200)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 16 Aug 2011 03:27:02 +0000 (20:27 -0700)
OPpENTERSUB_NOMOD was always set in combination with OPf_WANT_VOID
which is now used to not propagate the lvalue context, making
OPpENTERSUB_NOMOD redundant.

dump.c
op.c
op.h

diff --git a/dump.c b/dump.c
index c32807c..c19cb8e 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -811,7 +811,6 @@ const struct flag_to_name op_trans_names[] = {
 const struct flag_to_name op_entersub_names[] = {
     {OPpENTERSUB_DB, ",DB"},
     {OPpENTERSUB_HASTARG, ",HASTARG"},
-    {OPpENTERSUB_NOMOD, ",NOMOD"},
     {OPpENTERSUB_AMPER, ",AMPER"},
     {OPpENTERSUB_NOPAREN, ",NOPAREN"},
     {OPpENTERSUB_INARGS, ",INARGS"}
@@ -2962,8 +2961,6 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o)
                    sv_catpv(tmpsv, ",NOPAREN");
                if (o->op_private & OPpENTERSUB_INARGS)
                    sv_catpv(tmpsv, ",INARGS");
-               if (o->op_private & OPpENTERSUB_NOMOD)
-                   sv_catpv(tmpsv, ",NOMOD");
            }
            else {
                switch (o->op_private & OPpDEREF) {
diff --git a/op.c b/op.c
index c4c0e76..92fed2b 100644 (file)
--- a/op.c
+++ b/op.c
@@ -1759,8 +1759,6 @@ Perl_op_lvalue_flags(pTHX_ OP *o, I32 type, U32 flags)
            op_null(((LISTOP*)cUNOPo->op_first)->op_first);/* disable pushmark */
            break;
        }
-       else if (o->op_private & OPpENTERSUB_NOMOD)
-           return o;
        else {                          /* lvalue subroutine call */
            o->op_private |= OPpLVAL_INTRO
                           |(OPpENTERSUB_INARGS * (type == OP_LEAVESUBLV));
@@ -2356,7 +2354,6 @@ S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp)
                   op_append_elem(OP_LIST,
                               op_prepend_elem(OP_LIST, pack, list(arg)),
                               newSVOP(OP_METHOD_NAMED, 0, meth)));
-    imop->op_private |= OPpENTERSUB_NOMOD;
 
     /* Combine the ops. */
     *imopsp = op_append_elem(OP_LIST, *imopsp, imop);
diff --git a/op.h b/op.h
index 873dc49..f01e0bf 100644 (file)
--- a/op.h
+++ b/op.h
@@ -207,7 +207,6 @@ Deprecated.  Use C<GIMME_V> instead.
   /* OP_ENTERSUB only */
 #define OPpENTERSUB_DB         16      /* Debug subroutine. */
 #define OPpENTERSUB_HASTARG    32      /* Called from OP tree. */
-#define OPpENTERSUB_NOMOD      64      /* Immune to op_lvalue() for :attrlist. */
 #define OPpENTERSUB_INARGS     4       /* Lval used as arg to a sub. */
 #define OPpENTERSUB_DEREF      1       /* Lval call that autovivifies. */
 /* used by HINT_STRICT_SUBS     2          */