From: Mischa POSLAWSKY Date: Sat, 3 Oct 2009 18:57:05 +0000 (+0000) Subject: source: frontend to show code of any specified page X-Git-Tag: v1.3~126 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/2a3184b0ed95d89b689961a394e3d1035494ee45 source: frontend to show code of any specified page --- diff --git a/source.plp b/source.plp new file mode 100644 index 0000000..8193de5 --- /dev/null +++ b/source.plp @@ -0,0 +1,44 @@ +<: +use utf8; +use strict; +use warnings; + +our $VERSION = 'v1.0'; + +$header{content_type} = "text/html; charset=utf-8"; + +:> + + + + +sheet page source code + + + + +<: + +my $source = $ENV{PATH_INFO}; +$source =~ s{^/}{}; +$source ||= $0; +print "

Source of $source

\n"; + +require Text::VimColor; +print "
\n";
+my $hl = Text::VimColor->new(file => $source);
+print $hl->html;
+print "
\n"; +