This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: \N{...} in regular expression [PATCH]
[perl5.git] / pod / perldiag.pod
index d9aa877..f3a5eed 100644 (file)
@@ -1334,6 +1334,14 @@ specified in the C<\N{...}> escape.  Perhaps you forgot to load the
 corresponding C<overload> or C<charnames> pragma?  See L<charnames> and
 L<overload>.
 
+=item Constant(%s)%s: %s in regex; marked by <-- HERE in m/%s/
+
+(F) The parser found inconsistencies while attempting to find 
+the character name specified in the C<\N{...}> escape.  Perhaps you 
+forgot to load the corresponding C<charnames> pragma?  
+See L<charnames>.
+
+
 =item Constant is not %s reference
 
 (F) A constant value (perhaps declared using the C<use constant> pragma)
@@ -1841,6 +1849,13 @@ about 250 characters for simple names, and somewhat more for compound
 names (like C<$A::B>).  You've exceeded Perl's limits.  Future versions
 of Perl are likely to eliminate these arbitrary limitations.
 
+=item Ignoring %s in character class in regex; marked by <-- HERE in m/%s/
+
+(W) Named unicode character escapes (\N{...}) may return multi-char
+or zero length sequences. When such an escape is used in a character class
+its behaviour is not well defined. Check that the correct escape has 
+been used, and the correct charname handler is in scope.
+
 =item Illegal binary digit %s
 
 (F) You used a digit other than 0 or 1 in a binary number.
@@ -2928,7 +2943,7 @@ data.
 
 =item panic: fold_constants JMPENV_PUSH returned %d
 
-(P) While attemtping folding constants an exception other than an C<eval>
+(P) While attempting folding constants an exception other than an C<eval>
 failure was caught.
 
 =item panic: frexp
@@ -3750,7 +3765,7 @@ happened.) See L<perlfunc/split>.
 (W misc) You're declaring a C<state> variable inside a list. The list
 assignment will be treated by perl as a regular assignment, which means
 that the C<state> variable will be reinitialized each time the statement
-is run. The solution to have it initialized twice is to write the
+is run. The solution to have it initialized only once is to write the
 assignment on its own line, as in:
 
     state $var = 42;