Subject: | Options for read-only compiled template operation |
Date: | Thu, 18 Sep 2014 19:36:56 -0400 |
To: | bug-Template-Toolkit [...] rt.cpan.org |
From: | Dan Book <grinnz [...] gmail.com> |
In certain setups the application using the templates does not have write
access to the template location, for example when accessed from a web
server, and pre-generation of compiled template files makes sense. There
should be a way to have Template Toolkit be able to read existing compiled
files (via the existing COMPILE_EXT or COMPILE_DIR options) but just
fallback to the source template file instead of trying to write a new
compiled file.
Also, along the same vein, it would be nice to have an option that tells
Template Toolkit to use the compiled template file regardless of
modification time, in case the compiled file was generated and then the
source file was distributed through version control or copied by other
means (thus ending up with a newer modification time).
Perhaps a single option could be added that enables both behaviors, for
general pre-compilation usage.