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

People
Owner: Nobody in particular
Requestors: mjg [...] phoenixtrap.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.098
Fixed in: 1.104



Subject: Support "qw" strings in Perl::Critic::Policy::Miscellanea::RequireRcsKeywords
The included patch allows Perl::Critic to support this idiom for $Revision$ keywords when setting a module's version: use version; our $VERSION = qv( '1.0.' . qw$Revision: 429 $ ); It adds PPI::Token::QuoteLike::Words to the list of tokens searched for RCS keywords.
Subject: PerlCritic_qw.diff
--- /usr/local/tools/perl/lib/site_perl/5.10.0/Perl/Critic/Policy/Miscellanea/RequireRcsKeywords.pm.bak 2009-04-21 17:39:58.000008000 -0400 +++ /usr/local/tools/perl/lib/site_perl/5.10.0/Perl/Critic/Policy/Miscellanea/RequireRcsKeywords.pm 2009-04-21 17:40:56.000015000 -0400 @@ -120,6 +120,7 @@ || $elem->isa('PPI::Token::Comment') || $elem->isa('PPI::Token::Quote::Single') || $elem->isa('PPI::Token::Quote::Literal') + || $elem->isa('PPI::Token::QuoteLike::Words') || $elem->isa('PPI::Token::End'); }
Subject: Re: [rt.cpan.org #45196] Support "qw" strings in Perl::Critic::Policy::Miscellanea::RequireRcsKeywords
Date: Tue, 21 Apr 2009 19:46:30 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
mjg@phoenixtrap.com via RT wrote: Show quoted text
> The included patch allows Perl::Critic to support this idiom for > $Revision$ keywords when setting a module's version: > > use version; our $VERSION = qv( '1.0.' . qw$Revision: 429 $ ); > > It adds PPI::Token::QuoteLike::Words to the list of tokens searched for > RCS keywords.
We can't add generic Words. The delimiter needs to be checked as well.
Proposed fix committed as svn revision 3456. qw$Revision: 1234 $ is allowed, but any other qw delimiter (e.g. qw{ $Revision: 1234 $}) is not allowed. Tom Wyant
Subject: Re: [rt.cpan.org #45196] Support "qw" strings in Perl::Critic::Policy::Miscellanea::RequireRcsKeywords
Date: Tue, 25 Aug 2009 22:19:03 -0500
To: bug-Perl-Critic [...] rt.cpan.org
From: Elliot Shank <perl [...] galumph.com>
Released in v1.104. Thank you for the report.