perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John P. Gibbons" <j...@dashing.com>
Subject Re: Apache virtulahosts sharing modules
Date Wed, 21 Jul 2004 05:13:18 GMT

On Jul 20, 2004, at 9:44 PM, Gerald Richter wrote:
> If the files have different path _and_ different package names it will 
> work.
> If the files have no package name, it will compiled into the first 
> package
> where it is loaded and only accessable from this package/file.
>
>

Hi Gerald,

The include file has no package name. But I left out one crucial part 
of my example that makes all the difference. :-) Once I require the 
unique (per virtualhost) include file I then stuff the variables into 
the $req object. So if I have 5 virtualhosts then mod_perl will cache 
the 5 different include files and my module will put the correct values 
into $req depending on which site is being accessed.

At least that's my theory! :-) However Andrew's way is probably better, 
which is to put the db connect info into the  environment (per 
virtualhost in httpd.conf) and then pull the constants from a database 
table.

But in any case, will the method I suggested work? As I said before I'm 
doing all of this testing on one virtualhost and haven't rolled any of 
it out to my real sites yet. So I want to catch this stuff as soon as 
possible.

Cheers,
John


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message