I'm trying to reïmplement the general spirit of cv_clone() but specifically for my different use-case in Future::AsyncAwait; the chunk of code I copypasted from pad.c in this case is if(CvNAMED(orig)) CvNAME_HEK_set(new, share_hek_hek(CvNAME_HEK(orig))); else CvGV_set(new, CvGV(orig)); I notice that `CvNAME_HEK_set()` is available in cv.h, and feels the sort of macro that would be public API. I also notice that it doesn't work. Its definition calls `unshare_hek()`, which embed.h only defines inside #ifdef PERL_CORE, meaning it's not visible to XS users. If I simply steal the one-line #define unshare_hek(a) Perl_unshare_hek(aTHX_ a) then it appears to work fine, but it makes me feel cautious. A quick stare around Sub::Util's set_subname implementation doesn't reveal anything involving HEKs, only GVs, so I don't seem to be able to gain any insight there. Should I be using this API? -- Paul "LeoNerd" Evans leonerd@leonerd.org.uk | https://metacpan.org/author/PEVANS http://www.leonerd.org.uk/ | https://www.tindie.com/stores/leonerd/Thread Next