perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Förtsch <>
Subject Re: global variable
Date Wed, 03 Feb 2010 08:53:06 GMT
On Wednesday 03 February 2010 06:45:06 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.


View raw message