if (global)
stash = PL_defstash;
- else if ((COP*)PL_curcop == &PL_compiling) {
+ else if (IN_PERL_COMPILETIME) {
stash = PL_curstash;
if (add && (PL_hints & HINT_STRICT_VARS) &&
sv_type != SVt_PVCV &&
if (!stash) {
if (add) {
- qerror(Perl_mess(aTHX_
+ register SV *err = Perl_mess(aTHX_
"Global symbol \"%s%s\" requires explicit package name",
(sv_type == SVt_PV ? "$"
: sv_type == SVt_PVAV ? "@"
: sv_type == SVt_PVHV ? "%"
- : ""), name));
+ : ""), name);
+ if (USE_UTF8_IN_NAMES)
+ SvUTF8_on(err);
+ qerror(err);
stash = GvHV(gv_fetchpv("<none>::", GV_ADDMULTI, SVt_PVHV));
}
else