perl5a5:pat/inherit.pat
Larry Wall [Fri, 10 Dec 1993 00:00:00 +0000 (00:00 +0000)]
[random patch found in the perl-5alpha5 tarball applied separately]

gv.c

diff --git a/gv.c b/gv.c
index 45ad625..790e9d7 100644 (file)
--- 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 */