diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-18 01:35:50 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-12-18 01:35:50 +0000 |
commit | 0505442f3c585b66999f71b9bb23ab4d01c6531a (patch) | |
tree | 3f76bdb360e3a56c0a103543cb21055de4b4ec29 /toke.c | |
parent | 79d01fbf58287276b77349e580651d9897f9b25c (diff) | |
download | perl-0505442f3c585b66999f71b9bb23ab4d01c6531a.tar.gz |
fix from Larry for parsing C<{ 0x1 => 'foo'}> as an
anon hash rather than a block; test case for the same
p4raw-id: //depot/perl@4697
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2909,7 +2909,8 @@ Perl_yylex(pTHX) if (++t < PL_bufend && (!isALNUM(*t) || ((*t == 'q' || *t == 'x') && ++t < PL_bufend - && !isALNUM(*t)))) { + && !isALNUM(*t)))) + { char *tmps; char open, close, term; I32 brackets = 1; @@ -2940,8 +2941,10 @@ Perl_yylex(pTHX) } t++; } - else if (isIDFIRST_lazy(s)) { - for (t++; t < PL_bufend && isALNUM_lazy(t); t++) ; + else if (isALNUM_lazy(t)) { + t += UTF8SKIP(t); + while (t < PL_bufend && isALNUM_lazy(t)) + t += UTF8SKIP(t); } while (t < PL_bufend && isSPACE(*t)) t++; |