On Thu, Feb 14, 2008 at 9:13 AM, Rafael Caceres <[EMAIL PROTECTED]> wrote:
>  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)?

Modules loaded into the perl interpreter at startup are still there
when the process forks, so technically you don't have to ask for them
again.  I still recommend that you use() them in every module that
needs them, for testing and for documentation.

>  > (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?

I think that was just a wording mistake.  When the process forks, the
loaded modules are shared by the operating system's copy-on-write
feature.  I believe that's what he was trying to say.

- Perrin

Reply via email to