perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <rich...@ecos.de>
Subject RE: Apache virtulahosts sharing modules
Date Thu, 22 Jul 2004 18:17:45 GMT
> 
> 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.
> 

This will work when you require the file always into the same source file.
The require will done by Perl only once per file that you require. Every
Embperl source file runs in it's own package. In case you require the same
file into two different source files it will only be loaded into the first
one.

If there is only be one place where you do the require everything is ok

Gerald


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


Mime
View raw message