X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/5ea795d4f04b3fd605c4dfcf547e1969f1eb39be..v1.19-30-gee5b8a7f10:/browser.plp diff --git a/browser.plp b/browser.plp index c32e808..5a48f77 100644 --- a/browser.plp +++ b/browser.plp @@ -1,6 +1,5 @@ <(common.inc.plp)><: use List::Util qw(sum max first); -no if $] >= 5.018, warnings => 'experimental::smartmatch'; Html({ title => 'browser compatibility cheat sheet', @@ -83,19 +82,19 @@ say '
Alternate rendition of '.$ref;
my ($canihas, $usage);
my $minusage = $get{threshold} // 1;
-given ($get{usage} // 'wm') {
- when (!$_) {
- # none
- }
- when (!m{ \A [a-z]\w+ (?:/\d[\d-]*\d)? \z }x) {
+for ($get{usage} // 'wm') {
+ $_ or next; # none
+ unless (m{ \A [a-z]\w+ (?:/\d[\d-]*\d)? \z }x) {
Alert([
'Invalid browser usage data request',
'Identifier must be alphanumeric name or 0
.',
]);
+ next;
}
+
$canihas = eval { Data("data/browser/usage-$_") } or do {
Alert('Browser usage data not found', $@);
- break;
+ next;
};
$usage = $_;
my $ref = $canihas->{-title} || 'unknown';