(follow-up to previous commit, fix for #76540)
/* newCONSTSUB takes ownership of the reference from us. */
cv = newCONSTSUB(stash, (name0 ? name0 : name), has_constant);
+ assert(GvCV(gv) == cv); /* newCONSTSUB should have set this */
if (name0)
Safefree(name0);
/* If this reference was a copy of another, then the subroutine
} else {
(void) start_subparse(0,0); /* Create empty CV in compcv. */
cv = PL_compcv;
+ GvCV(gv) = cv;
}
- GvCV(gv) = cv;
LEAVE;
mro_method_changed_in(GvSTASH(gv)); /* sub Foo::bar($) { (shift) } sub ASDF::baz($); *ASDF::baz = \&Foo::bar */