Tom Allison ha scritto:

[snip other question]


Logging:

I am using a package Log::Dispatch to do my logging.
Is there any penalty to loading the same modules for Log::Dispatch into multiple Packages (Main plus all my custom package/modules)? IIRC this should share the memory but allow each package space to see the Log::Dispatch methods with no penalty memory or speed.

True?


Under apache/mod_perl, you maximize memory sharing by loading modules before children are spawn.
One way to achieve this is to put

  PerlModule <module_name>

directives in httpd.conf for every module that you use.

In addition, you need to

  use <module_name>;

in every module or script where you use that <module_name>'s exported functions or class medthods. If you don't include the 'use' directive you should get compilation errors.

--
Marcello Romani
Developer
Spin s.r.l.
Reggio Emilia
http://www.spinsoft.it


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to