summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--AUTHORS1
-rw-r--r--t/comp/parser.t12
-rw-r--r--toke.c2
3 files changed, 10 insertions, 5 deletions
diff --git a/AUTHORS b/AUTHORS
index b84a6e4a02..58d9ce5d55 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -460,6 +460,7 @@ Henrik Tougaard <ht.000@foa.dk>
Herbert Breunung <lichtkind@cpan.org>
Hernan Perez Masci <hmasci@uolsinectis.com.ar>
Hershel Walters <walters@smd4d.wes.army.mil>
+Hio <hio@hio.jp>
Hojung Youn <amoc.yn@gmail.com>
Holger Bechtold
Hongwen Qiu <qiuhongwen@gmail.com>
diff --git a/t/comp/parser.t b/t/comp/parser.t
index 8fd7e85957..7caa116c7d 100644
--- a/t/comp/parser.t
+++ b/t/comp/parser.t
@@ -8,7 +8,7 @@ BEGIN {
chdir 't';
}
-print "1..168\n";
+print "1..169\n";
sub failed {
my ($got, $expected, $name) = @_;
@@ -333,10 +333,10 @@ like($@, qr/BEGIN failed--compilation aborted/, 'BEGIN 7' );
eval qq[ *$xFD ];
like($@, qr/Identifier too long/, "too long id in glob ctx");
- eval qq[ for $xFD ];
+ eval qq[ for $xFC ];
like($@, qr/Missing \$ on loop variable/,
- "253 char id ok, but a different error");
- eval qq[ for $xFE; ];
+ "252 char id ok, but a different error");
+ eval qq[ for $xFD; ];
like($@, qr/Identifier too long/, "too long id in for ctx");
# the specific case from the ticket
@@ -495,6 +495,10 @@ eval 'Fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo'
.'ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo';
like $@, "^Identifier too long at ", 'ident buffer overflow';
+eval 'for my a1b $i (1) {}';
+# ng: 'Missing $ on loop variable'
+like $@, "^No such class a1b at ", 'TYPE of my of for statement';
+
# Add new tests HERE (above this line)
# bug #74022: Loop on characters in \p{OtherIDContinue}
diff --git a/toke.c b/toke.c
index 28e3511ebd..1ab57f332c 100644
--- a/toke.c
+++ b/toke.c
@@ -8035,7 +8035,7 @@ Perl_yylex(pTHX)
p += 3;
p = PEEKSPACE(p);
if (isIDFIRST_lazy_if(p,UTF)) {
- p = scan_ident(p, PL_tokenbuf, sizeof PL_tokenbuf, TRUE);
+ p = scan_word(p, PL_tokenbuf, sizeof PL_tokenbuf, TRUE, &len);
p = PEEKSPACE(p);
}
if (*p != '$')