X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/9918b9a0fe4c8ddb0a78cc4639959b2463c1f4dd..e1c15e98e78002475bc637d1a5848b45414b9e41:/codec.plp?ds=sidebyside diff --git a/codec.plp b/codec.plp index 8a5b6a8..2349b1d 100644 --- a/codec.plp +++ b/codec.plp @@ -1,25 +1,33 @@ <(common.inc.plp)><: -my @feat = split m{/+}, $Request || 'default'; +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 => 'Codecs', + 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.inc.pl'; -$info and %{$info} > 1 or Abort("cannot open operator include", 500, $@ // $!); +my $info = do "codec-$page.inc.pl"; +$info and %{$info} > 1 + or Abort("Requested codec type $page not available", '404 request not found', $@ // $!); + +say "

\u$title

"; my %BOOLSCORE = (y => [5, '✔'], n => [1, '✘'], 0 => [0, 'n/a']); :> -

Image codecs