diff options
Diffstat (limited to 'perl-install/pkgs.pm')
-rw-r--r-- | perl-install/pkgs.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 4533f1808..8e5e62afd 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -836,8 +836,9 @@ sub versionCompare($$) { local $_; while ($a || $b) { - my ($sb, $sa) = map { $1 if $a =~ /^\W*\d/ ? s/^\W*0*(\d+)// : s/^\W*(\D+)// } ($b, $a); + 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 $_; + $sa eq '' && $sb eq '' and return $a cmp $b; } } |