Java Mailing List Archive

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

Home » modperl.perl »

Re: global variable

Torsten Foertsch

2010-02-03

Replies: Find Java Web Hosting

Author LoginPost Reply
On Wednesday 03 February 2010 06:45:06 moli@(protected):
> 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.
>
File::Map mmap()s a file and makes it visible as a perl string. You can modify
it for example by using the lvalue form of substr().

MMapDB uses File::Map and provides some kind of a hash. (I have just uploaded
version 0.07 that handles utf8 strings correctly (me thinks so))

There is a mod_slotmem.c floating around. It provides something like apache's
scoreboard. That means each worker gets its own piece of shared memory to
write to while all slots can be read by anyone. I think it can be interfaced
to be used by Perl.

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