If there was a stub present in the package into which the invocant had
been blessed, then AUTOLOADing via a *method* call would warn with ‘Use
of inherited AUTOLOAD for non-method’ even if it is a method.
A recent commit stopped OPf_REF from being set on OP_ENTERSUB, so this
commit uses that flag to indicate a method call, to allow a fast run-
time check to see whether to pass the method flag to gv_autoload.
case OP_METHOD_SUPER:
case OP_METHOD_REDIR:
case OP_METHOD_REDIR_SUPER:
+ o->op_flags |= OPf_REF;
if (aop->op_type == OP_CONST) {
aop->op_private &= ~OPpCONST_STRICT;
const_class = &cSVOPx(aop)->op_sv;
else {
try_autoload:
autogv = gv_autoload_pvn(GvSTASH(gv), GvNAME(gv), GvNAMELEN(gv),
- GvNAMEUTF8(gv) ? SVf_UTF8 : 0);
+ (GvNAMEUTF8(gv) ? SVf_UTF8 : 0)
+ |(PL_op->op_flags & OPf_REF
+ ? GV_AUTOLOAD_ISMETHOD
+ : 0));
cv = autogv ? GvCV(autogv) : NULL;
}
if (!cv) {