X-Git-Url: http://git.shiar.net/sheet.git/blobdiff_plain/18402f44dfbfb0f3ab6f6069e51ac78c7e17707a..5c3baccaf899618ba93abdb136d1183456d13bbb:/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 '
';