<(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 => '<style>td,th {width:10%} tbody th {white-space:nowrap}</style>',
});
-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 <q>$page</q> not available", '404 request not found', $@ // $!);
+
+say "<h1>\u$title</h1>";
my %BOOLSCORE = (y => [5, '✔'], n => [1, '✘'], 0 => [0, 'n/a']);
:>
-<h1>Image codecs</h1>
<div class="section">
<table class="mapped">