X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0aaffaf050bd5ca5ce5b5caf9e8dec1e8a1b7a48..fca29b43ba1f5a0dc2931e0362ba7d3109be9c3c:/source.plp diff --git a/source.plp b/source.plp index de3ad54..ee129ce 100644 --- a/source.plp +++ b/source.plp @@ -1,28 +1,22 @@ <(common.inc.plp)><: - our $VERSION = 'v1.0'; - my $source = $ENV{PATH_INFO}; - $source =~ s{^/}{}; +my $source = $ENV{PATH_INFO}; +$source =~ s{^/}{}; -:> - +Html({ + title => "$source source code", + version => 'v1.0', + description => !$source ? 'Index of source files for this site.' : [ + "Source code of the $source file at this site,", + "with syntax highlighted and references linked." + ], + keywords => [qw' + sheet cheat source code perl plp html agpl + '], + stylesheet => [qw'light dark mono red'], +}); -
- -\n", EscapeHTML(ReadFile($source)), "\n"; + require Encode; + print "
\n"; + print EscapeHTML(Encode::decode_utf8(ReadFile($source))); + print "\n"; } + + print "\n"; } -:> - -