browser: minimum multiplier to stabilise order of unused versions
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 6 Dec 2010 03:59:26 +0000 (04:59 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Wed, 15 Dec 2010 21:40:44 +0000 (22:40 +0100)
browser.plp

index 3dc8d80..9adf10e 100644 (file)
@@ -142,7 +142,7 @@ sub featurescore {
                        while (my ($browser, $versions) = each %$row) {
                                ref $versions eq 'HASH' or next;
                                while (my ($version, $_) = each %$versions) {
-                                       $rank += $canihas->{$browser}->{$version} * $statspts->{$_};
+                                       $rank += ($canihas->{$browser}->{$version} || .001) * $statspts->{$_};
                                }
                        }
                        return $rank;