‘sub CORE::GLOBAL::require;’ doesn’t create a full glob, but cheats
for efficiency. Compilation of require ops was not taking this
into account.
if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) {
GV * const * const gvp = (GV**)hv_fetchs(PL_globalstash, "require", FALSE);
gv = gvp ? *gvp : NULL;
+ if (gv && !isGV(gv))
+ gv_init(gv, PL_globalstash, "require", 7, 0);
}
}
require 'Config_heavy.pl'; # since runperl will need them
}
-plan tests => 31;
+plan tests => 32;
#
# This file tries to test builtin override using CORE::GLOBAL
is runperl(prog => 'sub CORE::GLOBAL::glob; glob; print qq-ok\n-'),
"ok\n",
'no crash with CORE::GLOBAL::glob stub';
+is runperl(prog => 'sub CORE::GLOBAL::require; require re; print qq-o\n-'),
+ "o\n",
+ 'no crash with CORE::GLOBAL::require stub';