common: global Data() to parse perl code includes
[sheet.git] / mplayer.plp
index 077c7c5c76885594546772a47e3d937db4c81de4..f7b4445cd954500176198632f1643d1b824f8a61 100644 (file)
@@ -1,7 +1,7 @@
 <(common.inc.plp)><:
 
 my $mode = $Request eq 'mpv' ? $Request : 'MPlayer';
-my $include = "\L$mode.eng.inc.pl";
+my $include = "\L$mode.eng";
 
 Html({
        title => "\L$mode\E cheat sheet",
@@ -16,14 +16,14 @@ Html({
        '],
        stylesheet => [qw( light dark circus mono red )],
        keys => 1,
-       data => [$include],
+       data => ["$include.inc.pl"],
 });
 
 say "<h1>$mode cheat sheet</h1>";
 say '';
 
 use Shiar_Sheet::Keyboard 2;
-my $info = do $include or die $@;
+my $info = Data($include);
 my $keys = Shiar_Sheet::Keyboard->new($info);
 $keys->map($get{map}) or undef $get{map};
 $keys->print_rows($get{rows}, [1,0]);