diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-10-30 06:18:20 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-10-30 16:54:17 -0700 |
commit | e37958c391a6e98df6ad46860e1c472070272046 (patch) | |
tree | f883a95da83f08c2ee97ae64897f5cc485f60da8 /toke.c | |
parent | a9e3f35916a989e6c527206f43af85f49ef58cbb (diff) | |
download | perl-e37958c391a6e98df6ad46860e1c472070272046.tar.gz |
Eliminate ‘Can't use \1 to mean $1’ false positives
We need to check that the quote-like operator we are parsing is a sub-
stitution (not just any quote-like operator) and that we are parsing
the right-hand side.
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -6943,7 +6943,8 @@ Perl_yylex(pTHX) case '\\': s++; - if (PL_lex_inwhat && isDIGIT(*s)) + if (PL_lex_inwhat == OP_SUBST && PL_lex_repl == PL_linestr + && isDIGIT(*s)) Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX),"Can't use \\%c to mean $%c in expression", *s, *s); if (PL_expect == XOPERATOR) |