Subject: | Policy suggestion: quotes for quote-like operator delims |
I just recently eliminated several instances of this in Jifty.
qw'foo bar';
Its kinda weird to use " or ' or ` with any of the quote like operators.
I've seen things like qq`` (I think "CGI Programming in Perl" does
that) and have done q"" and qq'' as a deliberate obfuscation.
So I'd suggest a policy to check if any of ["'`] are used as delimiters
with any the non-regex quote-like operators (q, qq, qx, qw) and perhaps
the regex ops (m, s, qr and tr) and <<HERE_DOC. The following
exceptions exist...
* ' is ok for qx, m, qr, s and <<HERE_DOC as it stops interpolation.
* " is ok for HERE_DOC as it explicitly states that it interpolates.