This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
podcheck.t: Is problem if cpan/non-cpan have same NAME
authorKarl Williamson <public@khwilliamson.com>
Thu, 22 Sep 2011 15:08:30 +0000 (09:08 -0600)
committerKarl Williamson <public@khwilliamson.com>
Thu, 22 Sep 2011 15:24:13 +0000 (09:24 -0600)
If a module whose upstream is cpan has the same NAME as a module that
isn't, that is a problem that should be warned about, as we shouldn't be
shipping two identically named modules, even if one is not under Perl
core's control.  (If two cpan modules have the same name, it is a
problem as well, but not anything we can do anything about, so warn only
when cpan warnings are enabled.)

t/porting/podcheck.t

index 3550d4f..85e4492 100644 (file)
@@ -1475,7 +1475,10 @@ foreach my $filename (@files) {
                 $checker->set_skip("$prior_filename is a README apparently for $filename");
             } elsif ($filename =~ /\breadme\b/i) {
                 $checker->set_skip("$filename is a README apparently for $prior_filename");
-            } elsif (! $do_upstream_cpan && $filename =~ /^cpan/) {
+            } elsif (! $do_upstream_cpan
+                     && $filename =~ /^cpan/
+                     && $prior_filename =~ /^cpan/)
+            {
                 $checker->set_skip("CPAN is upstream for $filename");
             } else { # Here have two pods with identical names that differ
                 $prior_checker->poderror(