X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/ffee0c08773a4a5c4c8848193b6992a9fad4c824..b0060d114740f866161b5871976e41278acacfd2:/browser.plp diff --git a/browser.plp b/browser.plp index a4af534..2de8458 100644 --- a/browser.plp +++ b/browser.plp @@ -17,8 +17,18 @@ Html({
Alternate view of Fyrd's when can I use... page -with Wikimedia -browser usage statistics.
+<: +my $canihas = do 'browser-usage.inc.pl' + or printf "Browser usage data not found: %s.
\n", $! || $@; + +print "with $_ browser usage statistics." for map { + my $ref = $_->{-source} || 'unknown'; + $ref = sprintf '%s', $_, $ref for $_->{-url} || (); + $ref .= " $_" for $_->{-date} || (); + $ref +} $canihas || (); +:> +Browser usage data not found: %s.
\n", $_ - for $! || $@; - +{ - map { - $_ => +{ - map { - ($_->[4] => 0 ), # future - ($_->[3] => .5), # next - ($_->[0] => 5 ), # past - ($_->[1] => 10 ), # previous - ($_->[2] => 30 ), # current - } $caniuse->{agents}->{$_}->{versions} - } - } @browsers - }; # fallback hash based on release semantics -}; -my $scorediv = (max(map { sum(values %$_) } values %$canihas) // 1) / 100; +$canihas ||= { + map { + $_ => +{ + map { + ($_->[4] => 0 ), # future + ($_->[3] => .5), # next + ($_->[0] => 5 ), # past + ($_->[1] => 10 ), # previous + ($_->[2] => 30 ), # current + } $caniuse->{agents}->{$_}->{versions} + } + } @browsers +}; # fallback hash based on release semantics +my $scorediv = (max(map { ref $_ eq 'HASH' && sum(values %$_) } values %$canihas) // 1) / 100; print '