diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-09-16 12:49:12 -0700 |
---|---|---|
committer | Ricardo Signes <rjbs@cpan.org> | 2013-10-05 14:20:10 -0400 |
commit | 760ca74635309e90553eeb15e5ac62e6f19f5d86 (patch) | |
tree | 4250acb83b909872a1ee567e813962be25da6240 /toke.c | |
parent | 1f25714ad0c0126e303a12bd7ba010ac61b5e716 (diff) | |
download | perl-760ca74635309e90553eeb15e5ac62e6f19f5d86.tar.gz |
Fix a bug with ->@ inside "@{...}"
When encountering ->@[ or ->@{, we should only record that we are
going to need a POSTJOIN at the top level of interpolation, not
inside any brackets. Otherwise the ->@[ can interfere with an outer
"@{...}", causing syntax errors.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2186,7 +2186,9 @@ S_postderef(pTHX_ char const funny, char const next) PL_bufptr+=2; } else { - if ('@' == funny) PL_lex_dojoin = 2; + if ('@' == funny && PL_lex_state == LEX_INTERPNORMAL + && !PL_lex_brackets) + PL_lex_dojoin = 2; PL_expect = XOPERATOR; PL_bufptr++; } |