From 25406eb8126e2a05cad46512b60b40aa3d39ed39 Mon Sep 17 00:00:00 2001 From: Todd Rinaldo Date: Mon, 8 Oct 2018 18:21:01 -0500 Subject: [PATCH] Re-save templates to disk if they have changed? 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,.. --- lib/Template/Provider.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/Template/Provider.pm b/lib/Template/Provider.pm index f2b4df76..ebc034e8 100644 --- a/lib/Template/Provider.pm +++ b/lib/Template/Provider.pm @@ -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) { @@ -1010,7 +1010,7 @@ sub _template_content { local $/; binmode(FH); $data = ; - $mod_date = (stat($path))[9]; + $mod_date = $self->_template_modified($path); close(FH); } else {