Grokbase
Topics Posts Groups | in
x
[ help ]

Re: dir_config -- sanity required. (Restated)

View PostFlat  Thread  Threaded | < Prev - Next >
Michael Peters Re: dir_config -- sanity required. (Restated)
| +1 vote
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
Will Fould wrote:

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

This is because even though you've told apache to map a certain URL to a certain
script, there is only 1 running Perl interpreter. And since Perl only allows 1
file to occupy a certain namespace you get those conflicts.

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

The only way to have 2 different packages use the same package name is to have
separate Perls with different @INCS running. There's no way to do this under
Apache/mod_perl (that I'm aware of). So either run 2 different Apaches, or put
the modules into their own namespaces. Instead of "package Foo" do "package
ClientA::Foo".

--
Michael Peters
Developer
Plus Three, LP

Thread : dir_config -- sanity required. (Restated)
1)
Will Fould I had a typo on my previous post -- below has been corrected: I have 2 virtuals configured for the...
2)
Philip M. Gollucci package mypackage; make that package X; # for vhost1 and script1 package Y; # for vhosts2 and...
3)
Will Fould Thank Philip -- That helps! But both virtual hosts run their own installation of the same scripts...
4)
Michael Peters This is because even though you've told apache to map a certain URL to a certain script, there is...
5)
Malcolm J Harwood Actually looking at your original question, it looks like it should work as long as you are calling...
6)
Philip M. Gollucci Apparently you didn't notice, that I was sharing the /www/sites/net/p6m7g8/test/lib dir across both...
spacer
View PostFlat  Thread  Threaded | < Prev - Next >