Perl-Critic / PPI

53 stars 44 forks source link

Misparse of qw with backslashes as delimiters #125

Open moregan opened 9 years ago

moregan commented 9 years ago

The "Gory details of parsing quoted constructs" of perlop explicitly mentions that backslashes are legal qw delimiters, e.g. "qw\a b c\". PPI gets it right unless there is nothing inside the delimiters. With test file:

$ cat test.pl
print join ",", qw\\;

perl works as documented:

$ perl -W test.pl

but PPI does not:

$ perl -MPPI::Document -WE 'say join( ",", PPI::Document->new("test.pl")->schild(0)->schild(4)->literal )'
\;