Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Perl-Critic CPAN distribution.

Report information
The Basics
Id: 23290
Status: resolved
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



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.
Subject: Re: [rt.cpan.org #23290] Policy suggestion: quotes for quote-like operator delims
Date: Tue, 14 Nov 2006 20:00:49 -0800 (PST)
To: bug-Perl-Critic [...] rt.cpan.org
From: Jeffrey Thalhammer <jeffrey_thalhammer [...] yahoo.com>
Show quoted text
> 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.
I like it. That will definitely go in our TODO list. Perhaps we'll call it ProhibitOddQuotes. The RequireQuotedHeredocTerminator policy already requires singe or double quotes, to explicitly convey whether the HERE_DOC is going to be interpolated. -Jeff Show quoted text
____________________________________________________________________________________ Sponsored Link Don't quit your job - take classes online www.Classesusa.com
From: perl [...] galumph.com
Implemented as ValuesAndExpressions::ProhibitQuotesAsQuotelikeOperatorDelimiters.
This feature is now available on CPAN as Perl-Critic-1.06. Thanks for suggesting this.