From: Vincent Pit Date: Sat, 20 Sep 2014 16:11:14 +0000 (+0200) Subject: Work around an assertion failure in perl 5.21.4 X-Git-Tag: v0.25~3 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=9c757514ad4fdec1f0bf24cc31112cd0ecade555;p=perl%2Fmodules%2FScope-Upper.git Work around an assertion failure in perl 5.21.4 This was fixed in perl by commit 5988f306, in which Father Chrysostomos says "CvNAMED should never be on after calling [CvGV_set], regardless of the previous state of the CV". --- diff --git a/Upper.xs b/Upper.xs index 497b70e..8b2e639 100644 --- a/Upper.xs +++ b/Upper.xs @@ -1668,6 +1668,9 @@ STATIC CV *su_cv_clone(pTHX_ CV *proto, GV *gv) { #endif CvGV_set(cv, gv); +#if SU_RELEASE && SU_HAS_PERL_EXACT(5, 21, 4) + CvNAMED_off(cv); +#endif CvSTASH_set(cv, CvSTASH(proto)); /* Commit 4c74a7df, publicized with perl 5.13.3, began to add backrefs to * stashes. CvSTASH_set() started to do it as well with commit c68d95645