Re: [ID 20000828.017] bytecode fails with use subs;
Nicholas Clark [Thu, 28 Sep 2000 11:52:24 +0000 (12:52 +0100)]
Message-ID: <20000928115224.D7924@plum.flirble.org>

p4raw-id: //depot/perl@7118

op.c

diff --git a/op.c b/op.c
index 84a1df9..3389d93 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4561,6 +4561,9 @@ Perl_newATTRSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, OP *block)
     CvGV(cv) = (GV*)SvREFCNT_inc(gv);
     CvFILE(cv) = CopFILE(PL_curcop);
     CvSTASH(cv) = PL_curstash;
+    /* use subs; etc may have turned this on
+       As we're (re)defining the sub here it's definately not imported */
+    GvIMPORTED_CV_off(gv);
 #ifdef USE_THREADS
     CvOWNER(cv) = 0;
     if (!CvMUTEXP(cv)) {