Subject: | Posible bugs in Text::MicroMason::Cache::File |
Date: | Sun, 1 Oct 2006 14:48:00 +0100 (BST) |
To: | bug-Text-MicroMason [...] rt.cpan.org |
From: | Jon Warbrick <jw35 [...] cam.ac.uk> |
I believe that I have identified two bugs in
Text::MicroMason::Cache::File relating to cache expiry:
1) The 'file change' test ($entry->[1] < $mtime) has the inequality the
wrong way round (I think, this sort of thing makes my head hurt!) thanks
to -M producing weird values, for example ones that are negative for files
modified after the program started. In practice this means that a
component, once cached, will never be recompiled.
2) When used in conjunction with Text::MicroMason::TemplateDir,
Cache::File sees filenames without template_root added. Attempts to use
these with -M fail. This means, even with 1) fixed, that a cached
component accessed via template_root will still never be recompiled.
Bug 2) is a particular pain when developing a Catalyst site using
Text::MicroMason!
Attached are a test, based on 34-compile_cache.t, showing both of these
problems and a trivial patch to resolve the first of these. I've no idea
how to go about fixing the second problem.
Jon.
--
Jon Warbrick
Web/News Development, Computing Service, University of Cambridge
The following attachment was sent,
but NOT saved in the Fcc copy:
A Application/x-troff segment of about 1,804 bytes.
The following attachment was sent,
but NOT saved in the Fcc copy:
A Text/PLAIN segment of about 403 bytes.