Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r4203 - trunk/distributions/Perl-Critic-Deprecated/xt/author/consistent_version_numbers.t

perlcritic
Discussion topic

Back to topic list

svn commit: r4203 - trunk/distributions/Perl-Critic-Deprecated/xt/author/consistent_version_numbers.t

Author thaljef
Full name Jeffrey Ryan Thalhammer
Date 2013-10-25 16:51:38 PDT
Message Author: thaljef
Date: 2013-10-25 16:51:38-0700
New Revision: 4203

Modified:
   trunk/distributions/​Perl-Critic-Deprecat​ed/xt/author/consist​ent_version_numbers.​t

Log:
Exempt RequireRcsKeywords.pm from VERSION test.

This test is pretty old and doesn't do a very good
job of detecting the true $VERSION. RequireRcsKeywords.pm
has addtional $VERSION variables in the POD for documentation
purposes. But this test doesn't understand the difference.

We should use something from CPAN, preferably one of the
Dist::Zilla plugins.



Modified: trunk/distributions/​Perl-Critic-Deprecat​ed/xt/author/consist​ent_version_numbers.​t
Url: http://perlcritic.ti​gris.org/source/brow​se/perlcritic/trunk/​distributions/Perl-C​ritic-Deprecated/xt/​author/consistent_ve​rsion_numbers.t?view​=diff&pathrev=42​03&r1=4202&r​2=4203
====================​====================​====================​==================
--- trunk/distributions/​Perl-Critic-Deprecat​ed/xt/author/consist​ent_version_numbers.​t (original)
+++ trunk/distributions/​Perl-Critic-Deprecat​ed/xt/author/consist​ent_version_numbers.​t 2013-10-25 16:51:38-0700
@@ -39,6 +39,12 @@
     # only look at perl scripts, not sh scripts
     return if m{blib/script/}xms && $content !~ m/\A \#![^\r\n]+?perl/xms;
 
+ # RequireRcsKeywords has a $VERSION in POD for documentation purposes,
+ # but this test isn't smart enough to recognize that. So we just skip
+ # that file. These days, there are better tools on CPAN for testing
+ # VERSIONs, especially if using Dist::Zilla.
+ return if m{RequireRcsKeywords}xms;
+
     my @version_lines = $content =~ m/ ( [^\n]* \$VERSION [^\n]* ) /gxms;
     if (0 == @version_lines) {
        fail($_);

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r4203 - trunk/distributions/Perl-Critic-Deprecated/xt/author/consistent_version_numbers.t thaljef Jeffrey Ryan Thalhammer 2013-10-25 16:51:38 PDT
Messages per page: