diff options
-rw-r--r-- | pod/perldiag.pod | 20 | ||||
-rw-r--r-- | pod/perlreftut.pod | 4 | ||||
-rw-r--r-- | pod/perlstyle.pod | 2 | ||||
-rwxr-xr-x | t/op/misc.t | 2 | ||||
-rw-r--r-- | t/op/re_tests | 2 | ||||
-rw-r--r-- | toke.c | 6 |
6 files changed, 18 insertions, 18 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 73a4693597..7e5ab16a04 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -399,7 +399,7 @@ Perl yourself. =item Bareword "%s" not allowed while "strict subs" in use (F) With "strict subs" in use, a bareword is only allowed as a -subroutine identifier, in curly braces or to the left of the "=>" symbol. +subroutine identifier, in curly brackets or to the left of the "=>" symbol. Perhaps you need to predeclare a subroutine? =item Bareword "%s" refers to nonexistent package @@ -1579,11 +1579,11 @@ construction, but the command was missing or blank. (S) This is an educated guess made in conjunction with the message "%s found where operator expected". Often the missing operator is a comma. -=item Missing right bracket +=item Missing right curly or square bracket -(F) The lexer counted more opening curly brackets (braces) than closing ones. -As a general rule, you'll find it's missing near the place you were last -editing. +(F) The lexer counted more opening curly or square brackets than +closing ones. As a general rule, you'll find it's missing near the place +you were last editing. =item Modification of a read-only value attempted @@ -2781,12 +2781,12 @@ representative, who probably put it there in the first place. expressions. If you're a vi user, the % key is valuable for finding the matching parenthesis. See L<perlre>. -=item Unmatched right bracket +=item Unmatched right %s bracket -(F) The lexer counted more closing curly brackets (braces) than opening -ones, so you're probably missing an opening bracket. As a general -rule, you'll find the missing one (so to speak) near the place you were -last editing. +(F) The lexer counted more closing curly or square brackets than +opening ones, so you're probably missing a matching opening bracket. +As a general rule, you'll find the missing one (so to speak) near the +place you were last editing. =item unmatched [] in regexp diff --git a/pod/perlreftut.pod b/pod/perlreftut.pod index 4526e4a2a0..09bea594ff 100644 --- a/pod/perlreftut.pod +++ b/pod/perlreftut.pod @@ -336,11 +336,11 @@ other references. =item * -In B<USE RULE 1>, you can omit the curly braces whenever the thing +In B<USE RULE 1>, you can omit the curly brackets whenever the thing inside them is an atomic scalar variable like C<$aref>. For example, C<@$aref> is the same as C<@{$aref}>, and C<$$aref[1]> is the same as C<${$aref}[1]>. If you're just starting out, you may want to adopt -the habit of always including the curly braces. +the habit of always including the curly brackets. =item * diff --git a/pod/perlstyle.pod b/pod/perlstyle.pod index cf280ce1da..04aab9854a 100644 --- a/pod/perlstyle.pod +++ b/pod/perlstyle.pod @@ -16,7 +16,7 @@ The C<use sigtrap> and even C<use diagnostics> pragmas may also prove useful. Regarding aesthetics of code lay out, about the only thing Larry -cares strongly about is that the closing curly brace of +cares strongly about is that the closing curly bracket of a multi-line BLOCK should line up with the keyword that started the construct. Beyond that, he has other preferences that aren't so strong: diff --git a/t/op/misc.t b/t/op/misc.t index 48e22f6405..8281bf0e77 100755 --- a/t/op/misc.t +++ b/t/op/misc.t @@ -349,7 +349,7 @@ Sequence (?{...}) not terminated or not {}-balanced at - line 1, within pattern ######## /(?{"{"}})/ # Check it outside of eval too EXPECT -Unmatched right bracket at (re_eval 1) line 1, at end of line +Unmatched right curly bracket at (re_eval 1) line 1, at end of line syntax error at (re_eval 1) line 1, near ""{"}" Compilation failed in regexp at - line 1. ######## diff --git a/t/op/re_tests b/t/op/re_tests index 7009596b72..5abe217b05 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -402,7 +402,7 @@ a(?{{})b - c - /a(?{{})b/: Sequence (?{...}) not terminated or not {}-balanced a(?{}})b - c - /a(?{}})b/: Sequence (?{...}) not terminated or not {}-balanced a(?{"{"})b - c - /a(?{"{"})b/: Sequence (?{...}) not terminated or not {}-balanced a(?{"\{"})b cabd y $& ab -a(?{"{"}})b - c - Unmatched right bracket +a(?{"{"}})b - c - Unmatched right curly bracket a(?{$bl="\{"}).b caxbd y $bl { x(~~)*(?:(?:F)?)? x~~ y - - ^a(?#xxx){3}c aaac y $& aaac @@ -1928,7 +1928,7 @@ int yylex(PERL_YYLEX_PARAM_DECL) PL_last_uni = 0; PL_last_lop = 0; if (PL_lex_brackets) - yyerror("Missing right bracket"); + yyerror("Missing right curly or square bracket"); TOKEN(0); } if (s++ < PL_bufend) @@ -2372,7 +2372,7 @@ int yylex(PERL_YYLEX_PARAM_DECL) case ']': s++; if (PL_lex_brackets <= 0) - yyerror("Unmatched right bracket"); + yyerror("Unmatched right square bracket"); else --PL_lex_brackets; if (PL_lex_state == LEX_INTERPNORMAL) { @@ -2529,7 +2529,7 @@ int yylex(PERL_YYLEX_PARAM_DECL) rightbracket: s++; if (PL_lex_brackets <= 0) - yyerror("Unmatched right bracket"); + yyerror("Unmatched right curly bracket"); else PL_expect = (expectation)PL_lex_brackstack[--PL_lex_brackets]; if (PL_lex_brackets < PL_lex_formbrack) |