(sv_type == SVt_PVHV && !GvIMPORTED_HV(*gvp)) )
{
/* diag_listed_as: Variable "%s" is not imported%s */
- Perl_warn(aTHX_ "Variable \"%c%s\" is not imported",
+ Perl_ck_warner_d(
+ aTHX_ packWARN(WARN_MISC),
+ "Variable \"%c%s\" is not imported",
sv_type == SVt_PVAV ? '@' :
sv_type == SVt_PVHV ? '%' : '$',
name);
if (GvCVu(*gvp))
- Perl_warn(aTHX_ "\t(Did you mean &%s instead?)\n", name);
+ Perl_ck_warner_d(
+ aTHX_ packWARN(WARN_MISC),
+ "\t(Did you mean &%s instead?)\n", name
+ );
stash = NULL;
}
}
=item (Did you mean &%s instead?)
-(W) You probably referred to an imported subroutine &FOO as $FOO or some
-such.
+(W misc) You probably referred to an imported subroutine &FOO as $FOO or
+some such.
=item (Did you mean "local" instead of "our"?)
=item Variable "%s" is not imported%s
-(F) While "use strict" in effect, you referred to a global variable that
-you apparently thought was imported from another module, because
+(W misc) With "use strict" in effect, you referred to a global variable
+that you apparently thought was imported from another module, because
something else of the same name (usually a subroutine) is exported by
that module. It usually means you put the wrong funny character on the
front of your variable.
EXPECT
Global symbol "$foo" requires explicit package name at (re_eval 1) line 1.
Compilation failed in regexp at - line 3.
+########
+# [perl #73712] 'Variable is not imported' should be suppressable
+$dweck;
+use strict 'vars';
+no warnings;
+eval q/$dweck/;
+EXPECT