------=_Part_6360_10269024.1159026090852
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thank Philip -- That helps! But both virtual hosts run their own
installation of the same scripts (hence, same package names). The
installation loads it's configuration for those scripts located at $myvar (a
simple package with variables). Until recently, installations were always on
separate servers.

I thought that packages loaded from different locations, (but with the same
name), would not conflict. Silly me.

Is there a better way to do what I'm trying to do without running separate
servers for each host?

Thanks a lot for your reply and all your work on MP.


W


On 9/23/06, Philip M. Gollucci wrote:
>
> >Will Fould wrote:
> > package mypackage;
> > my($myvar)=();
> > my $r=Apache2::RequestUtil->request;
> > $myvar=$r->dir_config('BAR');

>
> From what I can see, you're only issue is that you've duplicated
> package mypackage;
>
> make that
>
> package X; # for vhost1 and script1
> package Y; # for vhosts2 and script2
>
> $ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v1"
> v1 => 1
> $ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v2"
> v2 => NOT DEFINED
> $ GET "http://v2.test.p6m7g8.net/perlsetvar?cv=v2"
> v2 => 2
> $ GET "http://v2.test.p6m7g8.net/perlsetvar?cv=v1"
> v1 => NOT DEFINED
> $ GET "http://v2.test.p6m7g8.net/perlsetvar?cv=v2"
> v2 => 2
> $ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v2"
> v2 => NOT DEFINED
> $ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v1"
> v1 => 1
>
> Source Code:
> http://test.p6m7g8.net/TEST/PerlSetVar.pm
>
> Virtual Host Configs:
> http://test.p6m7g8.net/TEST/net.p6m7g8.net.test.v1.conf
> http://test.p6m7g8.net/TEST/net.p6m7g8.net.test.v2.conf
>
>
> --
> ------------------------------------------------------------------------
> Philip M. Gollucci (pgollucci@p6m7g8.com) 323.219.4708
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
> 1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F
>
> When I call your name, Girl, it starts to flame
> Burning in my heart, Tearing it all apart..
> No matter how I try My love I cannot hide....
>


------=_Part_6360_10269024.1159026090852
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Thank Philip -- That helps!  But both virtual hosts run their own installation of the same scripts (hence, same package names). The installation loads it's configuration for those scripts located at $myvar (a simple package with variables). Until recently, installations were always on separate servers.


I thought that packages loaded from different locations, (but with the same name), would not conflict.  Silly me.

Is there a better way to do what I'm trying to do without running separate servers for each host?


Thanks a lot for your reply and all your work on MP.


W


On 9/23/06, Philip M. Gollucci <gollucci@p6m7g8.com">
pgollucci@p6m7g8.com> wrote:
>Will Fould wrote:
>     package mypackage;

>     my($myvar)=();
>     my $r=Apache2::RequestUtil->request;
>     $myvar=$r->dir_config('BAR');

From what I can see, you're only issue is that you've duplicated
package mypackage;


make that

package X;  # for vhost1 and script1
package Y;  # for vhosts2 and script2

$ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v1"

v1 => 1
$ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v2"
v2 => NOT DEFINED
$ GET "
http://v2.test.p6m7g8.net/perlsetvar?cv=v2
"
v2 => 2
$ GET "http://v2.test.p6m7g8.net/perlsetvar?cv=v1"
v1 => NOT DEFINED
$ GET "
http://v2.test.p6m7g8.net/perlsetvar?cv=v2"
v2 => 2
$ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v2
"
v2 => NOT DEFINED
$ GET "http://v1.test.p6m7g8.net/perlsetvar?cv=v1"
v1 => 1

Source Code:
        
http://test.p6m7g8.net/TEST/PerlSetVar.pm


Virtual Host Configs:
        http://test.p6m7g8.net/TEST/net.p6m7g8.net.test.v1.conf
        
http://test.p6m7g8.net/TEST/net.p6m7g8.net.test.v2.conf


--
------------------------------------------------------------------------
Philip M. Gollucci (
gollucci@p6m7g8.com">pgollucci@p6m7g8.com) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster -
http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

When I call your name, Girl, it starts to flame
Burning in my heart, Tearing it all apart..

No matter how I try My love I cannot hide....



------=_Part_6360_10269024.1159026090852--