Remove MAD-only debugging code from Perl_newATTRSUB_flags().
authorNicholas Clark <nick@ccl4.org>
Wed, 19 Sep 2012 15:43:21 +0000 (17:43 +0200)
committerNicholas Clark <nick@ccl4.org>
Wed, 19 Sep 2012 15:43:21 +0000 (17:43 +0200)
When MAD was enabled, if the cv under compilation was named "import" it was
assigned to PL_formfeed, and its address issued as an mandatory warning.
The use of PL_formfeed was only ever intended as a way to enter a debugger.
See commits a2edbdc9c7ad6335 and c1bd9b63a6f9fb1f, which removed the other
places that co-opted PL_formfeed for MAD debugging purposes.

op.c

diff --git a/op.c b/op.c
index 0b969e9..5d81504 100644 (file)
--- a/op.c
+++ b/op.c
@@ -7571,13 +7571,6 @@ Perl_newATTRSUB_flags(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs,
        cv = PL_compcv;
        if (name) {
            GvCV_set(gv, cv);
-           if (PL_madskills) {
-               if (strEQ(name, "import")) {
-                   PL_formfeed = MUTABLE_SV(cv);
-                   /* diag_listed_as: SKIPME */
-                   Perl_warner(aTHX_ packWARN(WARN_VOID), "0x%"UVxf"\n", PTR2UV(cv));
-               }
-           }
            GvCVGEN(gv) = 0;
            if (HvENAME_HEK(GvSTASH(gv)))
                /* sub Foo::bar { (shift)+1 } */