Skip to content

Commit

Permalink
Re-save templates to disk if they have changed?
Browse files Browse the repository at this point in the history
Resolves GH #98

TT does not save compiled on-fly templates to disk (only saves firs-
time compiled)

and second line - for help hacking via redefining functions for bases,
preprocessing,..
  • Loading branch information
toddr authored and atoomic committed Apr 28, 2024
1 parent bff44ff commit 25406eb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Template/Provider.pm
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ sub _refresh {
if $self->{ DEBUG };

($data, $error) = $self->_load($slot->[ NAME ], $slot->[ DATA ]->{ name });
($data, $error) = $self->_compile($data)
($data, $error) = $self->_compile($data, $self->_compiled_filename($slot->[ NAME ]))
unless $error;

if ($error) {
Expand Down Expand Up @@ -1010,7 +1010,7 @@ sub _template_content {
local $/;
binmode(FH);
$data = <FH>;
$mod_date = (stat($path))[9];
$mod_date = $self->_template_modified($path);
close(FH);
}
else {
Expand Down

0 comments on commit 25406eb

Please sign in to comment.