On Thu, 2005-09-08 at 10:36 -0500, Boysenberry Payne wrote: > From Chapter 5 Maintaining State: > > It uses IPC::Shareable and requires Storable > It ties Perl data structures (scalars and hashes, but not arrays.) > the idiom: > tie %H, 'IPC::Shareable', 'Test', {create => 1, mode => 0666}; > on success it will tie %H to the shared memory segment. > > You should be able to get the data from all of your child processes > once it's tied. > > The book suggests using tied(%hash)->shlock and tied(%hash)->shunlock > to lock the variable before updating and unlocking afterwards to prevent > multiple processes from updating at the same time.
I don't think this is relevant for the ENV variables problem, but I wanted to point out that IPC::Shareable is a lot slower (and more temperamental) than some other choices like Cache::FastMmap, BerkeleyDB, or even MySQL. I don't recommend using it at this point. - Perrin