[Catalyst] context in ::V::TT::new()

Todd Holbrook paradawks at gmail.com
Tue Jul 19 22:00:27 CEST 2005

On 7/19/05, Perrin Harkins <perrin at elem.com> wrote:

> snip <

> > >Actually, after preparing this I discovered I may not be able to use
> > >this after all without doing some other changes as it doesn't pick up
> > >when a template has been deleted.  I guess it keeps serving it out of
> > >a cache.  Unfortunately my application has a separate maintenance
> > >system that allows (trusted) administrators to modify/delete templates
> > >using a web tool.
> It might not catch deletes.  It does catch modifications.  If deletes
> happen often and you need them to be reflected immediately, you could
> subclass the Template::Provider to check for that.  (I think that's the
> right class.  Might be worth asking on the TT list to see if anyone did
> this already.)

Thanks, Perrin, that's exactly what I did this morning.  It involved
subclassing Template::Provider to rewrite part of _fetch_path() and
then making sure Catalyst::View::TT was using the new Provider.  I
found a partial solution on the TT list, but it only worked after the
template was hit twice and didn't seem to clean up the doubly linked
list properly.

Todd Holbrook
Systems Consultant
Simon Fraser University

More information about the Catalyst mailing list