> I have a question about require when using mod-perl.

The full story is at
http://theoryx5.uwinnipeg.ca/guide/porting/Name_collisions_with_Modules_and.
html

It sounds like you're having trouble because your .pl files are not real
modules but rather subs that get added into the current package space.  This
is a problem because required files are only loaded once per process
(standard require() behavior) but each Registry script has a different
package name.  The real fix is to give the .pl files package names and make
them into real modules, but here's a lame quick fix:

BEGIN {
do "mail.pl";
}

That will work, but it wastes memory by loading them multiple times per
child.  If you make them into real modules, they can be loaded from
startup.pl and thus be in shared memory.

- Perrin

Reply via email to