[Templates] Updating Template::Provider
Bill Moseley
moseley@hank.org
Sun, 28 Jan 2007 08:41:07 -0800
On Wed, Jan 24, 2007 at 01:19:40PM -0800, Bill Moseley wrote:
>
> http://hank.org/Provider.pm
Shit, two real hits, one hit with a referrer from the archives, and
four hits by googlebot, three of those only for the .diff file.
>
> 1) The new code fails a test in t/compile2.t. That test modifies the
> compiled .ttc file directly and then makes sure TT uses that modified
> file.
>
> My version tests if the mtime of the source .tt and compiled .ttc
> files are *the same*, but the existing code just makes sure that the
> .ttc file is the same or *newer*. That seems wrong because if one
> reverts a source template to a previous version (with an older date)
> then TT will continue to use the (newer but out-of-date ;) version in
> the disk cache.
>
> I'm confused, because t/compile2.t specifically tests for that
> behavior, so I must not be understanding the reasoning.
moseley@bumby:~/Template2/t$ cvs annotate compile2.t | grep hacked
Annotations for compile2.t
***************
1.1 (abw 04-Jul-00): $foo =~ s/the foo file/the hacked foo file/;
1.1 (abw 04-Jul-00): This is the hacked foo file, a is any value
moseley@bumby:~/Template2/t$ cvs log -r1.1 compile2.t
----------------------------
revision 1.1
date: 2000/07/04 14:28:15; author: abw; state: Exp;
*** empty log message ***
=============================================================================
I don't suppose Andy or anyone else remembers why that test was added
6+ years ago?
--
Bill Moseley
moseley@hank.org