Perl-Critic / PPI

53 stars 44 forks source link

PPI::Token::QuoteLike::Words->literal does not unescape #124

Closed moregan closed 9 years ago

moregan commented 9 years ago

Given this test file:

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

perl unescapes the interior backslash:

$ perl -W test.pl
/

but PPI doesn't:

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

The rules are in perlop's "Gory details of parsing quoted constructs" section.