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');
}