summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/gv.c b/gv.c
index e29f2fdfc2..71b9ec9707 100644
--- a/gv.c
+++ b/gv.c
@@ -692,10 +692,12 @@ Perl_gv_fetchmeth_pvn(pTHX_ HV *stash, const char *name, STRLEN len, I32 level,
}
packlen = HvNAMELEN_get(stash);
- if (packlen >= 7 && strEQ(hvname + packlen - 7, "::SUPER")) {
+ if ((packlen >= 7 && strEQ(hvname + packlen - 7, "::SUPER"))
+ || (packlen == 5 && strEQ(hvname, "SUPER"))) {
HV* basestash;
- packlen -= 7;
- basestash = gv_stashpvn(hvname, packlen,
+ basestash = packlen == 5
+ ? PL_defstash
+ : gv_stashpvn(hvname, packlen - 7,
GV_ADD | (HvNAMEUTF8(stash) ? SVf_UTF8 : 0));
linear_av = mro_get_linear_isa(basestash);
}