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: 55750
Status: open
Priority: 0/
Queue: Perl-Critic

People
Owner: Nobody in particular
Requestors: user42 [...] zip.com.au
Cc:
AdminCc:

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



Subject: ProhibitFixedStringMatches on qr in function call
Date: Sun, 21 Mar 2010 09:34:00 +1100
To: bug-Perl-Critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
In some of my code I had a qr with a set of fixed string matches, my @items = $twig->descendants(qr/^(item|entry)$/); which tickled ProhibitFixedStringMatches. The func is outside my control, so there's not much choice but to pass a fixed-set regexp. Similar quite possible arises in Test::More::like(). The pod for ProhibitFixedStringMatches could have a few words of guidance on this sort of thing. I was going to propose an option that would allow qr in function calls, but if it's infrequent then just some words in the pod advising either ##nocritic or ways to rewrite for particular modules like Test::More (if there are good ways) may be enough.
Subject: Re: [rt.cpan.org #55750] ProhibitFixedStringMatches on qr in function call
Date: Wed, 21 Apr 2010 21:06:29 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
On 3/20/10 5:35 PM, Kevin Ryde via RT wrote: Show quoted text
> The func is outside my control, so there's not much choice but to pass a > fixed-set regexp. Similar quite possible arises in Test::More::like().
Yeah, I know. Where I personally run into this most often is in exclusions with Pod::Coverage.
Subject: Re: [rt.cpan.org #55750] ProhibitFixedStringMatches on qr in function call
Date: Fri, 30 Apr 2010 11:03:59 +1000
To: bug-Perl-Critic [...] rt.cpan.org
From: Kevin Ryde <user42 [...] zip.com.au>
"Elliot Shank via RT" <bug-Perl-Critic@rt.cpan.org> writes: Show quoted text
> > Where I personally run into this most often is in exclusions with > Pod::Coverage.
I'm leaning a little further towards an option to allow qr, as I'd think if you're using that then it's because you have to. Still not certain though.