On Thursday 14 February 2008 09:13:41 am Rafael Caceres wrote:

> On Wed, 2008-02-13 at 23:00 +0100, André Warnier wrote:
> > Of course, what I forgot to mention below - and sorry if you know that
> > already - is that whichever perl modules you pre-load in your main
> > Apache server config via the startup.pl script, you do not need to "use"
> > anymore in all your perl scripts or Apache/mod_perl handlers.
>
> This is the first time that NOT using "use" because it was preloaded is
> mentioned. In fact, how would the modules compile (while testing for
> example)?

You can just call "import" on the modules rather than "use", but that doesn't 
gain you a whole lot.

> > (At the cost of having them (insibly) duplicated in all the children
> > processes).

> Again, this is the first time this is mentioned. It would mean that, say
> 10 or 20 scripts under mod_perl using DBI,DBD::Oracle,CGI and Template
> would have the effect of using up to 20 times the memory footprint?
> Wasn't preloading suposed to do the exact opposite?

Preloading avoids the duplication (at least as far as copy-on-write 
allows). "use"ing multiple times doesn't load multiple copies, it just 
imports the symbols to the local namespace.

I'm not sure what led Andre to believe otherwise. (Andre, can you explain?)

Reply via email to