sample: reference chapter titles by first word
[sheet.git] / source.plp
index 358bf8475f7355eecc190b76399483aa69d92f18..d7d7cb50da39a02247be400b341b7b63ae770bee 100644 (file)
@@ -29,7 +29,7 @@ if ($source =~ s{(?<=\Q.inc.pl\E)/jsonp?$}{} and -r $source) {
 
 Html({
        title => "$source source code",
-       version => '1.2',
+       version => '1.3',
        description => !$source ? 'Index of source files for this site.' : [
                "Source code of the $source file at this site,",
                "with syntax highlighted and references linked."
@@ -86,6 +86,7 @@ else {
                say '</pre>';
                exit;
        }
+       -e or mkdir for $cachefile =~ s{[^/]+\z}{}r; # dirname
        open my $cache, '>', $cachefile
                or Alert("Could not save cache", "Opening $cachefile failed: $!");;