From 36c52b49732390c13e0cd173ce626fdc62a6ac46 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Sat, 14 Apr 2001 14:23:46 +0000 Subject: fixed absurd mismatch of use <=> and cmp. --- rpmtools.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmtools.pm b/rpmtools.pm index aa706c4..2e70cc4 100644 --- a/rpmtools.pm +++ b/rpmtools.pm @@ -539,7 +539,7 @@ sub version_compare { 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 $_ || 0; + $_ = length($sa) <=> length($sb) || $sa cmp $sb and return $_ || 0; $sa eq '' && $sb eq '' and return $a cmp $b || 0; } 0; -- cgit v1.2.1