gv_init(topgv, stash, name, len, TRUE);
if (cv = GvCV(topgv)) {
- if (CvXSUB(cv) || CvROOT(cv)) { /* Not undefed. */
- if (!GvCVGEN(topgv) || /* not an inheritance cache */
- GvCVGEN(topgv) >= sub_generation) /* valid inh. cache */
+ if (CvXSUB(cv) || CvROOT(cv) || CvGV(cv)) { /* Not deleted, possibly autoloaded. */
+ if (GvCVGEN(topgv) >= sub_generation)
+ return topgv; /* valid cached inheritance */
+ if (!GvCVGEN(topgv)) { /* not an inheritance cache */
return topgv;
+ }
}
/* stale cached entry, just junk it */
SvREFCNT_dec(cv);