X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/6870b634422f3af487e759ca82c7e5b625166ea7..3f38a7192491a73a1527179cdd68218f023aed61:/source.plp?ds=sidebyside diff --git a/source.plp b/source.plp index 81b3408..b0b5daa 100644 --- a/source.plp +++ b/source.plp @@ -37,7 +37,6 @@ Html({ keywords => [qw' sheet cheat source code perl plp html agpl '], - stylesheet => [qw'light dark mono red'], data => [$source =~ m{\A($incname)\z}], }); @@ -88,8 +87,6 @@ else { exit; } -e or mkdir for $cachefile =~ s{[^/]+\z}{}r; # dirname - open my $cache, '>', $cachefile - or Alert("Could not save cache", "Opening $cachefile failed: $!");; if (my $hl = eval { $size < 32_768 or die 'large files take too long to parse'; @@ -111,6 +108,8 @@ else { Todo => 'em', PreProc => 'strong', ); + open my $cache, '>', $cachefile + or Alert("Could not save cache", "Opening $cachefile failed: $!");; say '
';
 		foreach (@{$hl}) {
@@ -139,6 +138,7 @@ else {
 		say '
'; } else { + warn $@ if $@; say '
';
 		print EscapeHTML(decode_utf8(ReadFile($path)));
 		say '
';