Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

PerlSwitches -I

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


matrix at itlegion

Sep 4, 2009, 7:18 AM

Post #1 of 4 (747 views)
Permalink
PerlSwitches -I

I have run into a problem. I want to have my packages
precompiled in apache process with

PerlModule X:Y

X:Y is my own package with is located in the site directory.
The site is a virtual host.

However, this apache also has many other virtual hosts with ALMOST the same
software with a package named X:Y, but a little bit modified.

So, in those virtual hosts i also need PerlModule X:Y

The problem is that mod_perl cannot find X:Y until i specify
PerlSwitches -I/host1/dir

But this works globally and cannot be specified per virtual host. I am
stuck here,
but i need this personalizaed for each virtual host.

Any workaround?

Regards,
Artem


adam.prime at utoronto

Sep 4, 2009, 7:25 AM

Post #2 of 4 (697 views)
Permalink
Re: PerlSwitches -I [In reply to]

Artem Kuchin wrote:
> I have run into a problem. I want to have my packages
> precompiled in apache process with
>
> PerlModule X:Y
>
> X:Y is my own package with is located in the site directory.
> The site is a virtual host.
>
> However, this apache also has many other virtual hosts with ALMOST the same
> software with a package named X:Y, but a little bit modified.
>
> So, in those virtual hosts i also need PerlModule X:Y
>
> The problem is that mod_perl cannot find X:Y until i specify
> PerlSwitches -I/host1/dir
>
> But this works globally and cannot be specified per virtual host. I am
> stuck here,
> but i need this personalizaed for each virtual host.
>
> Any workaround?

PerlOptions +Parent
http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_

I personally don't have any experience with this, but there are a number
of threads in the archives about it, some of which actually do have
confirmation that people managed to get it working right (IIRC)

Adam


aw at ice-sa

Sep 6, 2009, 2:30 AM

Post #3 of 4 (685 views)
Permalink
Re: PerlSwitches -I [In reply to]

Adam Prime wrote:
> Artem Kuchin wrote:
>> I have run into a problem. I want to have my packages
>> precompiled in apache process with
>>
>> PerlModule X:Y
>>
>> X:Y is my own package with is located in the site directory.
>> The site is a virtual host.
>>
>> However, this apache also has many other virtual hosts with ALMOST the
>> same
>> software with a package named X:Y, but a little bit modified.
>>
>> So, in those virtual hosts i also need PerlModule X:Y
>>
>> The problem is that mod_perl cannot find X:Y until i specify
>> PerlSwitches -I/host1/dir
>>
>> But this works globally and cannot be specified per virtual host. I am
>> stuck here,
>> but i need this personalizaed for each virtual host.
>>
>> Any workaround?
>
> PerlOptions +Parent
> http://perl.apache.org/docs/2.0/user/config/config.html#C_Parent_
>
> I personally don't have any experience with this, but there are a number
> of threads in the archives about it, some of which actually do have
> confirmation that people managed to get it working right (IIRC)
>
> Adam
>

I believe there may also be a subtle misunderstanding here:
An Apache Virtual Host is not, by itself, a separate process or thread.
All Apache children processes (pre-fork) or threads (worker) are created
equal; they ALL "contain" all virtual hosts. A Virtual Host is only a
"personality" that the child/thread which is handling the current
request adopts temporarily, to handle this current request. At the next
request, the same child/thread may take the personality of another
Virtual Host.
The only way to "personalise" something "for this Virtual Host", is to
make it totally dynamic, executed on a per-request base.


jhfoo-ml at extracktor

Sep 6, 2009, 8:40 PM

Post #4 of 4 (679 views)
Permalink
Re: PerlSwitches -I [In reply to]

I'm not sure if I remember right, but you may want to check out the
PerlOptions +Parent
option.

http://modperlbook.org/html/24-5-6-3-Parent.html

Artem Kuchin wrote:
> I have run into a problem. I want to have my packages
> precompiled in apache process with
>
> PerlModule X:Y
>
> X:Y is my own package with is located in the site directory.
> The site is a virtual host.
>
> However, this apache also has many other virtual hosts with ALMOST the
> same
> software with a package named X:Y, but a little bit modified.
>
> So, in those virtual hosts i also need PerlModule X:Y
>
> The problem is that mod_perl cannot find X:Y until i specify
> PerlSwitches -I/host1/dir
>
> But this works globally and cannot be specified per virtual host. I am
> stuck here,
> but i need this personalizaed for each virtual host.
>
> Any workaround?
>
> Regards,
> Artem
>
>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.