From: Larry Wall Date: Fri, 10 Dec 1993 00:00:00 +0000 (+0000) Subject: perl5a5:pat/inherit.pat X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9bbf408117c16189b372e6657c9e5a15d01ea504;p=p5sagit%2Fp5-mst-13.2.git perl5a5:pat/inherit.pat [random patch found in the perl-5alpha5 tarball applied separately] --- diff --git a/gv.c b/gv.c index 45ad625..790e9d7 100644 --- a/gv.c +++ b/gv.c @@ -133,19 +133,15 @@ STRLEN len; SV** svp = AvARRAY(av); I32 items = AvFILL(av) + 1; while (items--) { - char tmpbuf[512]; SV* sv = *svp++; - *tmpbuf = '_'; - SvUPGRADE(sv, SVt_PV); - strcpy(tmpbuf+1, SvPV(sv, na)); - gv = gv_fetchpv(tmpbuf,FALSE); - if (!gv || !(stash = GvHV(gv))) { + HV* basestash = fetch_stash(sv, FALSE); + if (!basestash) { if (dowarn) warn("Can't locate package %s for @%s'ISA", SvPVX(sv), HvNAME(stash)); continue; } - gv = gv_fetchmeth(stash, name, len); + gv = gv_fetchmeth(basestash, name, len); if (gv) { GvCV(topgv) = GvCV(gv); /* cache the CV */ GvCVGEN(topgv) = sub_generation; /* valid for now */