perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gerald Richter" <>
Subject Re: Apache virtulahosts sharing modules
Date Wed, 21 Jul 2004 04:44:20 GMT
>   Will it work if you have your perl module require a file filled with
> constants for each site? What I've been doing is my module determines
> the current site via $ENV{DOCUMENT_ROOT} and I then construct the
> correct path to the unique config file for each site. I then "require"
> that file in my module. This works for me, but right now I am only
> testing this with one VirtualHost so I don't know if there will be any
> issues. If not, this might be a good way to do it. I didn't want to
> have an Embperl specific include because I also have regular perl
> programs that run as cron jobs and I want them to also get access to
> those constants too. I just feed them the site name from the command
> line since they have no access to the Apache ENV variables, but the
> result is the same.
>   Thoughts on this technique?

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.

ALso the question is a little different
has an explaination for this behaviour.


Gerald Richter            ecos electronic communication services gmbh
IT-Securitylösungen * Webapplikationen mit Apache/Perl/mod_perl/Embperl

Post:       Tulpenstrasse 5          D-55276 Dienheim b. Mainz
E-Mail:          Voice:   +49 6133 939-122
WWW:      Fax:     +49 6133 939-333
ECOS BB-5000 Firewall- und IT-Security Appliance:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message