This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: Document ‘\N{} in character class restricted...’
authorFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 13:58:08 +0000 (05:58 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 21:08:52 +0000 (13:08 -0800)
pod/perldiag.pod
t/porting/diag.t

index 521a0ea..2c73b98 100644 (file)
@@ -3223,6 +3223,16 @@ a bracketed character class, for the same reason that C<.> in
 a character class loses its specialness: it matches almost
 everything, which is probably not what you want.
 
+=item \N{} in character class restricted to one character in regex; marked
+by <-- HERE in m/%s/
+
+(F) Named Unicode character escapes C<(\N{...})> may return a
+multi-character sequence.  Such an escape may not be used in
+a character class, because character classes always match one
+character of input.  Check that the correct escape has been used,
+and the correct charname handler is in scope.  The <-- HERE shows
+whereabouts in the regular expression the problem was discovered.
+
 =item \N{NAME} must be resolved by the lexer in regex; marked by <-- HERE in m/%s/
 
 (F) When compiling a regex pattern, an unresolved named character or
index d359ecf..0e6316c 100644 (file)
@@ -556,7 +556,6 @@ Malformed UTF-8 character (fatal)
 Missing (suid) fd script name
 More than one argument to open
 More than one argument to open(,':%s')
-\N{} in character class restricted to one character in regex; marked by <-- HERE in m/%s/
 No message queue
 No %s allowed while running setgid
 No %s allowed with (suid) fdscript