=item A sequence of multiple spaces in a charnames alias definition is deprecated
-(D) You defined a character name which had multiple space characters in
-a row. Change them to single spaces. Usually these names are defined
-in the C<:alias> import argument to C<use charnames>, but they could be
-defined by a translator installed into C<$^H{charnames}>. See
-L<charnames/CUSTOM ALIASES>.
+(D deprecated) You defined a character name which had multiple space
+characters in a row. Change them to single spaces. Usually these
+names are defined in the C<:alias> import argument to C<use charnames>, but
+they could be defined by a translator installed into C<$^H{charnames}>.
+See L<charnames/CUSTOM ALIASES>.
=item assertion botched: %s
=item Trailing white-space in a charnames alias definition is deprecated
-(D) You defined a character name which ended in a space character.
-Remove the trailing space(s). Usually these names are defined in the
-C<:alias> import argument to C<use charnames>, but they could be defined
-by a translator installed into C<$^H{charnames}>.
+(D deprecated) You defined a character name which ended in a space
+character. Remove the trailing space(s). Usually these names are
+defined in the C<:alias> import argument to C<use charnames>, but they
+could be defined by a translator installed into C<$^H{charnames}>.
See L<charnames/CUSTOM ALIASES>.
=item Transliteration pattern not terminated
eval q [use utf8; "\N{TOO MANY SPACES}"];
ok (! defined $w, "... same under 'use utf8'");
}
+ {
+ use warnings FATAL=> 'deprecated';
+ () = eval q ["\N{TOO MANY SPACES}"];
+ like ($@, qr/A sequence of multiple spaces in a charnames alias definition is deprecated/, "... the deprecation warning can be fatal");
+ eval q [use utf8; () = "\N{TOO MANY SPACES}"];
+ like ($@, qr/A sequence of multiple spaces in a charnames alias definition is deprecated/, "... same under utf8");
+ }
undef $w;
eval q [is("\N{TRAILING SPACE }", "TRAILING SPACE ", "Trailing space in character name works")];
eval q [use utf8; "\N{TRAILING SPACE }"];
ok (! defined $w, "... same under 'use utf8'");
}
+ {
+ use warnings FATAL=>'deprecated';
+ () = eval q ["\N{TRAILING SPACE }"];
+ like ($@, qr/Trailing white-space in a charnames alias definition is deprecated/, "... the warning can be fatal");
+ eval q [use utf8; () = "\N{TRAILING SPACE }"];
+ like ($@, qr/Trailing white-space in a charnames alias definition is deprecated/, "... same under utf8");
+ }
# If remove the limitation in regcomp code these should work
# differently
goto bad_charname;
}
if (*s == ' ' && *(s-1) == ' ' && ckWARN_d(WARN_DEPRECATED)) {
- Perl_warn(aTHX_ "A sequence of multiple spaces in a charnames alias definition is deprecated");
+ Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
+ "A sequence of multiple spaces in a charnames "
+ "alias definition is deprecated");
}
s++;
}
if (*(s-1) == ' ' && ckWARN_d(WARN_DEPRECATED)) {
- Perl_warn(aTHX_ "Trailing white-space in a charnames alias definition is deprecated");
+ Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
+ "Trailing white-space in a charnames alias "
+ "definition is deprecated");
}
}
else {
}
if (*s == ' ' && *(s-1) == ' '
&& ckWARN_d(WARN_DEPRECATED)) {
- Perl_warn(aTHX_ "A sequence of multiple spaces in a charnames alias definition is deprecated");
+ Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
+ "A sequence of multiple spaces in a charnam"
+ "es alias definition is deprecated");
}
s++;
}
}
}
if (*(s-1) == ' ' && ckWARN_d(WARN_DEPRECATED)) {
- Perl_warn(aTHX_ "Trailing white-space in a charnames alias definition is deprecated");
+ Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
+ "Trailing white-space in a charnames alias "
+ "definition is deprecated");
}
}