From 2a3184b0ed95d89b689961a394e3d1035494ee45 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 3 Oct 2009 18:57:05 +0000 Subject: [PATCH] source: frontend to show code of any specified page --- source.plp | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 source.plp 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"; + -- 2.30.0