perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrin Harkins" <>
Subject Re: Are global variables truly global?
Date Mon, 05 Nov 2001 04:00:24 GMT
> Will the different child processes created by Apache share the same
> variable? Or will each child create an additional instance?

Each child has a separate interpreter and thus a separate instance of
your global.  If you need to co-ordinate data between processes, you
might want to look at Cache::Cache or MLDBM::Sync.  If you just need an
exclusive lock, file locking is the simplest way to go.

- Perrin

View raw message