Java Mailing List Archive

http://www.apache-httpd.com/

Home » modperl.perl »

Re: global variable

Perrin Harkins

2010-02-03

Replies: Find Java Web Hosting

Author LoginPost Reply
On Wed, Feb 3, 2010 at 2:20 AM, André Warnier <aw@(protected):
> moli@(protected):
>>
>> Hello,
>>
>> Is there a method to setup a global variable for all modperl child
>> processes?
>> Also this variable will be updated sometime, when it get updated, all
>> processes will know it.
>>
> As a general answer, no.

That's right. Apache uses multiple processes and there's no built-in
way to share perl variables between them. If you want to share data
and don't want to use a database, look at tools like CHI on CPAN.

- Perrin
©2008 apache-httpd.com - Jax Systems, LLC, U.S.A.