From: gfx Date: Mon, 31 Aug 2009 02:29:49 +0000 (+0900) Subject: Set the right flags on the renamed CVs X-Git-Tag: 0.05~1 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5804808d5265cff7e819429bab5c511c5f22a3bb;p=p5sagit%2FSub-Name.git Set the right flags on the renamed CVs Once they're named, they're not ANON anymore. Also we added magic for refcounting GVs to them, so they're MAGICAL as well. --- diff --git a/Name.xs b/Name.xs index f2c7903..f6d7bc2 100644 --- a/Name.xs +++ b/Name.xs @@ -81,6 +81,8 @@ subname(name, sub) SvREFCNT_dec(mg->mg_obj); mg->mg_flags |= MGf_REFCOUNTED; mg->mg_obj = (SV *) gv; + SvRMAGICAL_on(cv); + CvANON_off(cv); #ifndef CvGV_set CvGV(cv) = gv; #else