Yes you get the benefit of shared modules. PerlRun only differs from
registry in the sense that it clears out the namespace of the main script.
As for leaking memory like a sieve? That is not unexpected with PerlRun
scripts because they are typically not coded cleanly. Hell, even our 6 year
old Extropia Perl 4 scripts will run under PerlRun. A surprise. But it
doesn't mean it is efficient.
In fact, I would suggest that you create two backend mod_perl servers, one
for PerlRun and one for your cleaner mod_perl scripts. The PerlRun server
should be set up to destroy itself after much fewer hits... so you could
still get the benefits of the shared module loading because of the
preforked module loading, but the individual apache engines can clean
themselves out sooner.
At 02:54 PM 6/7/00 +0100, David Brown wrote:
>OK, I'm new to all this, and it's by a sheer miracle that I've compiled Perl
>5.6, Apache & mod_perl on my BSDI 4.1 box. I may be using completely the
>wrong terminology, so please bear with me !
>
>I'm running lots of scripts under Apache::PerlRun, migrating the scripts one
>at a time to run in Apache::Registry
>
>My question is: If I add the preload CGI/DBI modules into Apache in my
>startup.pl (with use CGI; CGI->compile(':all'); ) will the PerlRun scripts
>benefit from that, or is it only Apache::Registry scripts that benefit.
>
>Reason I ask, is that currently all of my scripts under Apache::Registry
>have no need for CGI.pm & DBI modules as I've got away with using
>Apache::Request to handle requests and they don't access any databases. I
>only need CGI / DBI etc. for the PerlRun scripts, and don't want to bloat my
>httpd processes with preloading the modules if they're not going be used
>for PerlRun scripts.
>
>Does any of that make sense ?
>
>I've also got big problems with memory leaking like a sieve when using
>PerlRun.. but I'll pose that one later ! ;-)
>
>BTW: Thanks to all you guys, esp. Doug & Stas for submitting so many
>responses in the past that I've been able to search through to get where I
>am now !
>