parse_version doesn't always succeed.
Jarkko Hietaniemi [Sat, 13 Sep 2003 18:33:41 +0000 (18:33 +0000)]
p4raw-id: //depot/perl@21214

Porting/cmpVERSION.pl

index 1364e1d..052051c 100644 (file)
@@ -45,8 +45,9 @@ find(
                    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;
 
-