git.shiar.nl
/
sheet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
keyboard/altgr/unigraph: bump version after perl v5.32 rebuild
[sheet.git]
/
codec.plp
diff --git
a/codec.plp
b/codec.plp
index 5c3e572e1023241ef0cb3cb75f371ff44bbd1683..1aeaa3ba9d8cf6708f0a6148bd6f6b8fccbc6db5 100644
(file)
--- a/
codec.plp
+++ b/
codec.plp
@@
-4,25
+4,22
@@
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";
$page !~ /\W/ or Html(), Abort('Invalid codec type request', 400);
@feat or @feat = 'default';
my $title = "$page codecs";
+my $info = eval { Data("codec-$page") };
+if ($@) {
+ $info = {};
+}
Html({
title => "$title cheat sheet",
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'],
+ version => '1.1',
+ description => $info->{intro},
+ keywords => [@{ $info->{keywords} // [] }, qw' feature comparison support benchmark '],
data => ["codec-$page.inc.pl"],
raw => '<style>td,th {width:8%} tbody th {white-space:nowrap}</style>',
});
data => ["codec-$page.inc.pl"],
raw => '<style>td,th {width:8%} tbody th {white-space:nowrap}</style>',
});
-my $info = Data("codec-$page");
-$info and %{$info} > 1
- or Abort("Requested codec type <q>$page</q> not available", '404 request not found', $@ // $!);
+%{$info}
+ or Abort("Requested codec type <q>$page</q> not available", '404 request not found');
say "<h1>\u$title</h1>";
say "<p>$_</p>" for $info->{intro} // ();
say "<h1>\u$title</h1>";
say "<p>$_</p>" for $info->{intro} // ();