This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove extraneous dot from ‘Missing right brace...’
authorFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 14:10:40 +0000 (06:10 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 17 Nov 2013 21:08:53 +0000 (13:08 -0800)
$ ./perl -Ilib -e '/\N{/'
Missing right brace on \N{} or unescaped left brace after \N. at -e line 1, within pattern
Execution of -e aborted due to compilation errors.

That dot before ‘at -e’ is confusing.

t/lib/croak/toke
toke.c

index 8e4b033..9020452 100644 (file)
@@ -9,6 +9,12 @@ eval "s//<<foo/e"; die $@
 EXPECT
 Can't find string terminator "foo" anywhere before EOF at (eval 1) line 1.
 ########
+# NAME /\N{/
+/\N{/
+EXPECT
+Missing right brace on \N{} or unescaped left brace after \N at - line 1, within pattern
+Execution of -e aborted due to compilation errors.
+########
 # NAME Missing name in "my sub"
 use feature 'lexical_subs'; my sub;
 EXPECT
diff --git a/toke.c b/toke.c
index efb6533..180059e 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -3567,7 +3567,7 @@ S_scan_const(pTHX_ char *start)
                    if (! PL_lex_inpat) {
                        yyerror("Missing right brace on \\N{}");
                    } else {
-                       yyerror("Missing right brace on \\N{} or unescaped left brace after \\N.");
+                       yyerror("Missing right brace on \\N{} or unescaped left brace after \\N");
                    }
                    continue;
                }