You probably need to store the config data in a singleton class type thing
and make sure its passed to your subroutines, rather than depending on it
being existant in the compile-time environment...

If you do a search in the archives of this list for 'singleton' you should
find examples and further explanations.  I don't know enough to do that
myself off the cuff.

(I just pass everything)

Skylos

On Thu, 18 Mar 2004, Marc Brooks wrote:

> Hello ALL,
>
> Not sure if this is possible.. So here I go..
>
> I have a set of .pm's and .cgi scripts that are within each Virtual Host.
>
> Example:
>
> /home/domain1.com/community/Community/Toolkit.pm  -- Methods accessed by-->
> http://domain1.com/community/login.cgi
> /home/domain2.com/community/Community/Toolkit.pm  -- Methods accessed by-->
> http://domain2.com/community/login.cgi
> /home/domain3.com/community/Community/Toolkit.pm  -- Methods accessed by-->
> http://domain3.com/community/login.cgi
>
> The Toolkit.pm described above is a set of reusable methods (basically a
> library tailored for each domain)
> It requires a file called Config.pm that sets up the website configuration
> variables.
>
> The Toolkit use's other Modules like that run under the Apache::Registry;
>
> Apache::Request
> Apache::Cookie
> Template::Toolkit
> DBI;
>
> The problem I am facing is when you execute domain1.com's login.cgi
> occasionally you will get output from
> domain 2 or 3's login.cgi (variables basically change)
>
> Any suggestions or easy ways to resolve this?
>
> ----------------------------------------------------------------------------
> --
>
> I have tried:
>
> # This works but has issues like described above
>
> PerlModule Apache::Registry
>
> <Directory /www/domain.com/community/>
>     <Files *.cgi>
>         SetHandler perl-script
>         PerlHandler Apache::Registry
>         PerlSendHeader On
>         Options +ExecCGI
>     </Files>
> </Directory>
>
>
>
> Thank you , thank you, thank you...
>
> --
> Report problems: http://perl.apache.org/bugs/
> Mail list info: http://perl.apache.org/maillist/modperl.html
> List etiquette: http://perl.apache.org/maillist/email-etiquette.html
>
>

- [EMAIL PROTECTED]
- The best part about the internet is nobody knows you're a dog.
  (Peter Stiener, The New Yorker, July 5, 1993)
- Dogs like... TRUCKS!  (Nissan commercial, 1996)
- PGP key: http://dogpawz.com/skylos/mykey.asc

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to