propagate CvFLAGS() into clones
Gurusamy Sarathy [Fri, 17 Mar 2000 05:42:45 +0000 (05:42 +0000)]
p4raw-id: //depot/perl@5780

op.c

diff --git a/op.c b/op.c
index 3d70756..35fa3f5 100644 (file)
--- a/op.c
+++ b/op.c
@@ -4151,9 +4151,8 @@ S_cv_clone2(pTHX_ CV *proto, CV *outside)
 
     cv = PL_compcv = (CV*)NEWSV(1104,0);
     sv_upgrade((SV *)cv, SvTYPE(proto));
+    CvFLAGS(cv) = CvFLAGS(proto) & ~CVf_CLONE;
     CvCLONED_on(cv);
-    if (CvANON(proto))
-       CvANON_on(cv);
 
 #ifdef USE_THREADS
     New(666, CvMUTEXP(cv), 1, perl_mutex);