Re: PerlSwitches -I

2009-09-06 Thread André Warnier

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.




Re: PerlSwitches -I

2009-09-06 Thread Foo JH
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






PerlSwitches -I

2009-09-04 Thread Artem Kuchin

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




Re: PerlSwitches -I

2009-09-04 Thread Adam Prime

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


Re: [mp2] PerlSwitches -I not working?

2004-10-18 Thread Stas Bekman
Colin Wetherbee wrote:
Stas Bekman said:
Was the request made to that vhost. I'm sure it works if you move it out
of the virtualhost container.

Indeed, PerlSwitches -I works outside the vhost container.
Could cause all sorts of conflicts among vhosts that aren't aware of each
other that way, though. :(
Something is wrong then. Are you using the latest mp2 (1.99_16)? It should 
work I think, we use it all in the test suite, grep for PerlSwitches and 
you will see.

Also does it make any difference if you replace -I with -Mlib?
--
__
Stas BekmanJAm_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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: [mp2] PerlSwitches -I not working?

2004-10-17 Thread Stas Bekman
Colin Wetherbee wrote:
Greetings.
Following reading Stas's last email to Scot, I poked around on the
configuration directives page and saw that PerlSwitches -I/foo is a
convenient replacement for 'use lib'.
I removed 'use lib' from a script and put the following in my virtual host
section:
PerlSwitches -I/var/www/hydrogen.denterprises.org/exec/perl
This doesn't appear to end up in @INC because I get the following in my
error log (which shows that /var/www/... is not in @INC):
[Fri Oct 15 21:23:33 2004] [error] 20945: ModPerl::Registry: Can't locate
Hydrogen/Const.pm in @INC (@INC contains: /usr/lib/perl5/Apache2 /etc/perl
/usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl . /etc/apache2/ /etc/apache2/lib/perl) at
/var/www/suexec/hydrogen.denterprises.org/hydrogen.pl line 21.\nBEGIN
failed--compilation aborted at
/var/www/suexec/hydrogen.denterprises.org/hydrogen.pl line 21.\n
Was the request made to that vhost. I'm sure it works if you move it out 
of the virtualhost container. May be that path is wrong and perl has 
ignored it? Does the following test work?

perl -I/var/www/hydrogen.denterprises.org/exec/perl -MHydrogen::Const -e0
Is PerlSwitches functionality still experimental?
Not at all.
Probably unrelated but judging by the error message it seems that you are 
using an old mod_perl version (in your bug reports please always follow 
these guidelines):
http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems

--
__
Stas BekmanJAm_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
--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


[mp2] PerlSwitches -I not working?

2004-10-16 Thread Colin Wetherbee
Greetings.

Following reading Stas's last email to Scot, I poked around on the
configuration directives page and saw that PerlSwitches -I/foo is a
convenient replacement for 'use lib'.

I removed 'use lib' from a script and put the following in my virtual host
section:

PerlSwitches -I/var/www/hydrogen.denterprises.org/exec/perl

This doesn't appear to end up in @INC because I get the following in my
error log (which shows that /var/www/... is not in @INC):

[Fri Oct 15 21:23:33 2004] [error] 20945: ModPerl::Registry: Can't locate
Hydrogen/Const.pm in @INC (@INC contains: /usr/lib/perl5/Apache2 /etc/perl
/usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8
/usr/local/lib/site_perl . /etc/apache2/ /etc/apache2/lib/perl) at
/var/www/suexec/hydrogen.denterprises.org/hydrogen.pl line 21.\nBEGIN
failed--compilation aborted at
/var/www/suexec/hydrogen.denterprises.org/hydrogen.pl line 21.\n

Is PerlSwitches functionality still experimental?

Colin

-- 
Colin W. Wetherbee
http://hydrogen.denterprises.org/

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html