core-cpan-diff should allow some files only in Perl
authorDavid Golden <dagolden@cpan.org>
Wed, 16 Feb 2011 20:22:40 +0000 (15:22 -0500)
committerDavid Golden <dagolden@cpan.org>
Wed, 16 Feb 2011 20:22:40 +0000 (15:22 -0500)
Uses CUSTOMIZED in Maintainers.pl to also track files that only exist
in Perl and not on CPAN.

Porting/core-cpan-diff

index 7c8a312..56e7f84 100644 (file)
@@ -317,8 +317,7 @@ EOF
                 next;
             }
 
-            my $relative_mapped_file = $mapped_file;
-            $relative_mapped_file =~ s/^(cpan|dist|ext)\/.*?\///;
+            my $relative_mapped_file = relatively_mapped($mapped_file);
 
             my $different =
               file_diff( $outfh, $abs_cpan_file, $mapped_file, $reverse,
@@ -364,11 +363,23 @@ EOF
             }
         }
         for ( sort keys %perl_unseen ) {
-            print $outfh "  Perl only: $_\n" unless $use_diff;
+            my $relative_mapped_file = relatively_mapped($_);
+            if ( customized( $m, $relative_mapped_file ) ) {
+                print $outfh "  Customized: $_\n";
+            }
+            else {
+                print $outfh "  Perl only: $_\n" unless $use_diff;
+            }
         }
     }
 }
 
+sub relatively_mapped {
+    my $relative = shift;
+    $relative =~ s/^(cpan|dist|ext)\/.*?\///;
+    return $relative;
+}
+
 # given FooBar-1.23_45.tar.gz, return FooBar
 
 sub distro_base {