This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
parse_version doesn't always succeed.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 13 Sep 2003 18:33:41 +0000 (18:33 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
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
                    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;
 
                } }, curdir);
 print map { $_, "\n" } sort @wanted;
 
-