perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <>
Subject Re: PerlRequire's access to httpd.conf variables
Date Sun, 25 Jan 2004 02:57:48 GMT
Philip Mak wrote:
> In the following situation:
> <VirtualHost>
> ServerName
> PerlSetVar Global /home/site1/global
> PerlRequire
> </VirtualHost>
> <VirtualHost>
> ServerName
> PerlSetVar Global /home/site2/global
> PerlRequire
> </VirtualHost>
> With the above example httpd.conf, is there a way can read
> the PerlSetVar Global and see "/home/site1/global", while can
> read it and see "/home/site2/global"? Or is this information not
> available yet during the startup sequence?

It'd be helpful if you have mentioned which mp generation you are talking 
about, Philip.

At the moment in mp2 you have no way to access the vhost server record in 
PerlRequire unless you traverse the linked list of servers. Apache->server 
gives you the base server. I think it does the same in mp1, but I don't remember.

You are much better off using Perl sections, where you are independent of 
Apache and have everything in perl, and you have a full control of what's 


require "";
foo::bar::init(global => "/home/site1/global")

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker     mod_perl Guide --->

Reporting bugs:
Mail list info:
List etiquette:

View raw message