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

Andy Wardley abw@andywardley.com
Fri, 1 Nov 2002 18:20:01 +0000


Mark Fowler wrote:
> Isn't this true even if we've already forked?  Doing this after we've 
> forked is quite bad...you'll eat vast chunks of memory (depending on how 
> many child processes you have running.)

It should only get executed once, when the module is first loaded.
And even if preload() does get called more than once, the modules 
wont be reloaded because require() should realise that they've already 
been loaded.

Unless, of course, there's some subtlety that I've overlooked...

> Of course, I could be wrong about this...

Me too!

:-)

A