Re: Modifying @INC on a Per-VirtualHost

Ben RUBSON <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
> On 19 Aug 2017, at 22:40, Ben RUBSON <[email protected]> wrote:
> 
> Hi list,
> 
> I have a question regarding tuning @INC at VirtualHost level, with prefork MPM.
> (...)
> will I have 2 (2 different PerlSwitches configurations)
> or 11 (11 different VH using PerlSwitches) interpreters launched ?

Well, reading at Parent (which is needed), gave me the answer :
https://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_

I will have 11 interpreters.

So a better configuration would be :

PerlSwitches -T -I/home/production/lib/perl
<VirtualHost prod1>
    ... 
</VirtualHost>
<VirtualHost prod2>
    ... 
</VirtualHost>
<VirtualHost prodn>
    ... 
</VirtualHost>

<VirtualHost dev>
    PerlOptions +Parent
    PerlSwitches -I/home/development/lib/perl
</VirtualHost>

However, here is what I have reaching VH dev :
[warn] -T switch is ignored, enable with 'PerlSwitches -T' in httpd.conf
And according to ${^TAINT}, taint is no more enabled in VH dev.
Any workaround ?

Many thanks again !

Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.