[Templates] TT Speed Question

Mark Fowler mark@twoshortplanks.com
Thu, 9 Jan 2003 00:14:21 +0000 (GMT)


On Wed, 8 Jan 2003, Perrin Harkins wrote:

> (Andy, maybe Template should default to using a persistent cache kept in
> a global so that people don't keep getting tripped up by this.)

I'd be wary about doing this as it could potentially cause a lot of
problems for existing code out there.

Better would be to create a standard module "Template::Singlton" or
something that does the right thing.  Remember, Template is just
a very every thin layer around Template::Service.  You'd have to be
careful about the include path passed and the current working directory to
determin which cached template::service you should use, but there you go.

Mark.

-- 
#!/usr/bin/perl -T
use strict;
use warnings;
print q{Mark Fowler, mark@twoshortplanks.com, http://twoshortplanks.com/};