X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/682883c393a571b058b75bc2e493f5722945a448..3f38a7192491a73a1527179cdd68218f023aed61:/source.plp diff --git a/source.plp b/source.plp index 7385218..b0b5daa 100644 --- a/source.plp +++ b/source.plp @@ -87,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'; @@ -110,6 +108,8 @@ else { Todo => 'em', PreProc => 'strong', ); + open my $cache, '>', $cachefile + or Alert("Could not save cache", "Opening $cachefile failed: $!");; say '
';
 		foreach (@{$hl}) {
@@ -138,6 +138,7 @@ else {
 		say '
'; } else { + warn $@ if $@; say '
';
 		print EscapeHTML(decode_utf8(ReadFile($path)));
 		say '
';