Subject: | suggest parsing string interpolations as code |
Date: | Mon, 30 Mar 2009 11:56:46 +1100 |
To: | bug-PPI [...] rt.cpan.org |
From: | Kevin Ryde <user42 [...] zip.com.au> |
It'd be good if interpolated variables and expressions in double-quote
strings were parsed to a PPI::Statement or similar sub-nodes.
With @{[]} tricks like ``print "@{[1+2**3]}"'' I believe it's possible
to have quite complicated expressions which perlcritic could helpfully
look into, notice which variables are used, etc.
I'm not sure what that would mean for compatibility if
PPI::Token::Quote::Double suddenly had child nodes. I'd guess most
things would still be fine, even if it meant a PPI::Token was no longer
direct source code bytes.