Thomas Klausner wrote:
Hi!

On Tue, Mar 18, 2003 at 01:39:41PM -0500, Chris Faust wrote:


I'm running mod_perl 2 on RedHat with Apache 2.0.44 and I'm using NamedBased
Virtual Hosting in apache (so I have a number of virtual hosts and apache
directs properly based on hostname).

I use a startup.pl to load up common things like DBI, CGI, HTML::Template
etc..

Should I have just a single startup.pl and will that work with all virtual
hosts? Or should I have a startup.pl per virtual host.


AFAIK, and with mod_perl 1.x, having multiple startup.pl's makes no sense as
they all get executed during server startup and in the main namespace.

That's correct only for mod_perl 1.0.


For mod_perl 2.0 this depends on whether 'PerlOptions +Parent' is set or not. If it is each vhost can have their own startup.pl (only that vhost will ever execute/see the code that run from it). It's documented here:
http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_


(though as someone reported PerlOptions +Parent doesn't work inside the <Location> container, I haven't had a chance to work on it yet.)

However this is all new code and not very tested yet, so I won't be surprised if there are problems with it. If you have problems report them as explained here:
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com



Reply via email to