[Templates] [PATCH] lazily load File::Temp

Andy Wardley abw@andywardley.com
Fri, 1 Nov 2002 16:58:40 +0000


Bradley Baetz wrote:
> File::Temp takes quite a while to load [...]
> The attached patch
> changes Template::Document to require File::Temp only when needed, meaning
> that for compiled templates its never loaded at all.

Thanks Bradley.  In fact, it will only get loaded if you're using compiled
templates and you need to write a compiled template to disk.  So it's a 
win for most cases.

Patch applied.  Thanks.  I also set File::Basename to load dynamically,
BTW.

And further to the other replies to this post, I'll also add some way of
preloading all TT modules for mod_perl and other cases.  More to follow
on that.

Cheers
A