Mention that ::ISA::CACHE:: no longer exists
[p5sagit/p5-mst-13.2.git] / Porting / cmpVERSION.pl
index b335476..052051c 100644 (file)
@@ -22,17 +22,32 @@ for (@ARGV[0, 1]) {
 my $dir2 = rel2abs($ARGV[1]);
 chdir $ARGV[0] or die "$0: chdir '$ARGV[0]' failed: $!\n";
 
+# Files to skip from the check for one reason or another,
+# usually because they pull in their version from some other file.
+my %skip;
+@skip{'./lib/Exporter/Heavy.pm'} = ();
+
 my @wanted;
 find(
      sub { /\.pm$/ &&
+              ! exists $skip{$File::Find::name}
+              &&
               do { my $file2 =
                        catfile(catdir($dir2, $File::Find::dir), $_);
-                   return if compare($_, $file2) == 0;
+                   (my $xs_file1 = $_)     =~ s/\.pm$/.xs/;
+                   (my $xs_file2 = $file2) =~ s/\.pm$/.xs/;
+                   if (-e $xs_file1 && -e $xs_file2) {
+                       return if compare($_, $file2) == 0 &&
+                                 compare($xs_file1, $xs_file2) == 0;
+                   } else {
+                       return if compare($_, $file2) == 0;
+                   }
                    my $version1 = eval {MM->parse_version($_)};
                    my $version2 = eval {MM->parse_version($file2)};
                    push @wanted, $File::Find::name
-                       if $version1 eq $version2
+                       if defined $version1 &&
+                          defined $version2 &&
+                           $version1 eq $version2
                } }, curdir);
 print map { $_, "\n" } sort @wanted;
 
-