This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: reflow ‘Missing right brace on \N{}’
authorFather Chrysostomos <sprout@cpan.org>
Mon, 14 Feb 2011 05:37:48 +0000 (21:37 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 14 Feb 2011 05:39:30 +0000 (21:39 -0800)
for ‘use diagnostics’ output on eighty-column terminals

pod/perldiag.pod

index 54120b3..23f6e60 100644 (file)
@@ -2645,30 +2645,29 @@ can vary from one line to the next.
 
 =item Missing right brace on \N{} or unescaped left brace after \N
 
-(F)
-C<\N> has two meanings.
-
-The traditional one has it followed by a name enclosed
-in braces, meaning the character (or sequence of characters) given by that name.
-Thus C<\N{ASTERISK}> is another way of writing C<*>, valid in both
-double-quoted strings and regular expression patterns.  In patterns, it doesn't
-have the meaning an unescaped C<*> does.
-
-Starting in Perl 5.12.0, C<\N> also can have an additional meaning (only) in
-patterns, namely to match a non-newline character.  (This is short for
-C<[^\n]>, and like C<.> but is not affected by the C</s> regex modifier.)
-
-This can lead to some ambiguities.  When C<\N> is not followed immediately by a
-left brace, Perl assumes the C<[^\n]> meaning.  Also, if
-the braces form a valid quantifier such as C<\N{3}> or C<\N{5,}>, Perl assumes
-that this means to match the given quantity of non-newlines (in these examples,
-3; and 5 or more, respectively).  In all other case, where there is a C<\N{>
-and a matching C<}>, Perl assumes that a character name is desired.
-
-However, if there is no matching C<}>, Perl doesn't know if it was mistakenly
-omitted, or if C<[^\n]{> was desired, and
-raises this error.  If you meant the former, add the right brace; if you meant
-the latter, escape the brace with a backslash, like so: C<\N\{>
+(F) C<\N> has two meanings.
+
+The traditional one has it followed by a name enclosed in braces,
+meaning the character (or sequence of characters) given by that
+name. Thus C<\N{ASTERISK}> is another way of writing C<*>, valid in both
+double-quoted strings and regular expression patterns.  In patterns,
+it doesn't have the meaning an unescaped C<*> does.
+
+Starting in Perl 5.12.0, C<\N> also can have an additional meaning (only)
+in patterns, namely to match a non-newline character.  (This is short
+for C<[^\n]>, and like C<.> but is not affected by the C</s> regex modifier.)
+
+This can lead to some ambiguities.  When C<\N> is not followed immediately
+by a left brace, Perl assumes the C<[^\n]> meaning.  Also, if the braces
+form a valid quantifier such as C<\N{3}> or C<\N{5,}>, Perl assumes that this
+means to match the given quantity of non-newlines (in these examples,
+3; and 5 or more, respectively).  In all other case, where there is a
+C<\N{> and a matching C<}>, Perl assumes that a character name is desired.
+
+However, if there is no matching C<}>, Perl doesn't know if it was
+mistakenly omitted, or if C<[^\n]{> was desired, and raises this error.
+If you meant the former, add the right brace; if you meant the latter,
+escape the brace with a backslash, like so: C<\N\{>
 
 =item Missing right curly or square bracket