summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLarry Wall <larry@netlabs.com>1993-12-10 00:00:00 +0000
committerLarry Wall <larry@netlabs.com>1993-12-10 00:00:00 +0000
commit9bbf408117c16189b372e6657c9e5a15d01ea504 (patch)
treee0279c6f690aa6a54058333dc82776fdf75e9a40
parentf511e57ff4db0bbf2d653a58c8f5a33e79431894 (diff)
downloadperl-9bbf408117c16189b372e6657c9e5a15d01ea504.tar.gz
perl5a5:pat/inherit.pat
[random patch found in the perl-5alpha5 tarball applied separately]
-rw-r--r--gv.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gv.c b/gv.c
index 45ad6259f0..790e9d7c81 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 */