This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PATCH: deprecation warnings for unreasonable charnames
authorKarl Williamson <khw@khw-desktop.(none)>
Sat, 20 Feb 2010 06:53:36 +0000 (23:53 -0700)
committerSteve Hay <steve.m.hay@googlemail.com>
Sat, 20 Feb 2010 11:03:53 +0000 (11:03 +0000)
commitcb233ae346c666d88ee890fc837f4cd3195c1f0b
tree0d414ca0a66af489c1d4764b5aec0f2061aa6b72
parentc3c4140635dd08363a20c93a8c8b6d8e7464b891
PATCH: deprecation warnings for unreasonable charnames

Prior to now just about anything has been legal for a character name in
\N{...}.  This means that legal code was broken by having \N{3,4} for
example mean [^\n]{3,4}.  Such code doesn't come from standard
charnames, but from legal custom translators.

This patch deprecates "unreasonable" names.  handy.h is changed by the
addition of macros that taken together define the names we deem
reasonable,  namely alpha beginning with alphanumerics and some
punctuations as continuations.

toke.c is changed to parse each name and to raise a warning if any
problematic characters are found.

Some tests and diagnostic documentation are also included.
handy.h
pod/perldiag.pod
t/re/pat_advanced.t
toke.c