From 45146b38ee32999a1e73286d57ad27588bf4026f Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Sat, 14 Apr 2001 14:25:28 +0000 Subject: fixed absurd mismatch of use of <=> and cmp on versionCompare. --- perl-install/pkgs.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/pkgs.pm') diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 3d143c8d7..ff6d0a0ad 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -864,7 +864,7 @@ sub versionCompare($$) { while ($a || $b) { my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D*)// } ($b, $a); - $_ = length($sa) cmp length($sb) || $sa cmp $sb and return $_; + $_ = length($sa) <=> length($sb) || $sa cmp $sb and return $_; $sa eq '' && $sb eq '' and return $a cmp $b || 0; } } -- cgit v1.2.1