perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Peters <>
Subject Re: share use vars?
Date Fri, 17 Jul 2009 14:40:28 GMT
Fayland Lam wrote:

> I'm wondering in which way the $geo_ip is sharable through the threads.
> we are using "server/mpm/prefork"

Neither. Prefork doesn't use threads it uses separate processes. And processes 
cannot share Perl variables like that. Both of the examples you showed would 
only have a single Geo::IP object per-process (although you probably don't want 
to use a global like that. A local (my) or package visible (our) variable is 
probably better.

Why do you want to share it between your processes?

Michael Peters
Plus Three, LP

View raw message