(common.inc.plp)><:
my ($page, @feat) = split m{/+}, $Request || 'image';
$page !~ /\W/ or Html(), Abort('Invalid codec type request', 400);
@feat or @feat = 'default';
my $title = "$page codecs";
Html({
title => "$title cheat sheet",
version => '1.0',
description => [
],
keywords => [qw'
codec encoder encoding decode file format type mime
feature comparison support benchmark compression
image audio video
'],
stylesheet => [qw'light circus dark red'],
data => [qw'codec.inc.pl'],
raw => '',
});
my $info = do "codec-$page.inc.pl";
$info and %{$info} > 1
or Abort("Requested codec type $page
not available", '404 request not found', $@ // $!);
say "
$_
" for $info->{intro} // (); my %BOOLSCORE = (y => [5, '✔'], n => [1, '✘'], 0 => [0, 'n/a']); :>'; say "\t", ' | ', $_->{name} for @codeccols; print ' |
---|---|
', $_->{available} for @codeccols; say ' | |
%s', $featinfo->{name} // $feat; for (@codecs) { my ($score, $data, $title) = map { ref ? @$_ : $_ } $featinfo->{score}->{$_}; if (not defined $data) { if (my $override = $BOOLSCORE{$score}) { ($score, $data) = @{$override}; } else { $data = '•' x ($score - 1); } } printf ' | ', $data; } say ' | '; } :>