Re: global variable

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Wednesday 03 February 2010 06:45:06 [email protected] wrote:
> 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.