summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-12-04 16:00:48 -0800
committerFather Chrysostomos <sprout@cpan.org>2013-12-04 21:20:51 -0800
commit257dc59d7b864a6cf0ccc9179de1f3f0a797f4e0 (patch)
tree302d3f4351fca49e715746900560052eff9f6d53 /gv.c
parent522b3c1ed452af6cfa7979f3283556433ebb4a26 (diff)
downloadperl-257dc59d7b864a6cf0ccc9179de1f3f0a797f4e0.tar.gz
[perl #120694] Fix ->SUPER::foo and AUTOLOAD
Commit aae438050a20 (5.17.4) broke ->SUPER::foo with AUTOLOAD by look- ing up AUTOLOAD from the current package, rather than the current package’s superclass. Instead of keeping track of whether it was doing a SUPER lookup via a ::SUPER prefix on the package name, that commit changed method lookup to pass a GV_SUPER flag around (to fix another bug) and to pass the current stash, rather than __PACKAGE__::SUPER. But it did not update gv_autoload_pvn to pass that flag through to gv_fetchmeth_pvn when actually looking up the method.
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gv.c b/gv.c
index 569537b2c7..686f20641b 100644
--- a/gv.c
+++ b/gv.c
@@ -1122,7 +1122,8 @@ Perl_gv_autoload_pvn(pTHX_ HV *stash, const char *name, STRLEN len, U32 flags)
packname = sv_2mortal(newSVhek(HvNAME_HEK(stash)));
if (flags & GV_SUPER) sv_catpvs(packname, "::SUPER");
}
- if (!(gv = gv_fetchmeth_pvn(stash, S_autoload, S_autolen, FALSE, is_utf8)))
+ if (!(gv = gv_fetchmeth_pvn(stash, S_autoload, S_autolen, FALSE,
+ is_utf8 | (flags & GV_SUPER))))
return NULL;
cv = GvCV(gv);