common: global Data() to parse perl code includes
[sheet.git] / codec.plp
index 4251df9239cf9b95e16d585a21df325ecad57f51..34246950dcc25c7e27d5c01064993d6ad15b6465 100644 (file)
--- a/codec.plp
+++ b/codec.plp
@@ -20,11 +20,12 @@ Html({
        raw => '<style>td,th {width:8%} tbody th {white-space:nowrap}</style>',
 });
 
-my $info = do "codec-$page.inc.pl";
+my $info = Data("codec-$page");
 $info and %{$info} > 1
        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} // ();
 
 my %BOOLSCORE = (y => [5, '✔'], n => [1, '✘'], 0 => [0, 'n/a']);
 :>