perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Sergeant <mserge...@startechgroup.co.uk>
Subject RE: Are global variables truly global?
Date Mon, 05 Nov 2001 08:55:36 GMT
> -----Original Message-----
> From: Chui G. Tey [mailto:chui.tey@advdata.com.au]
> 
> package Apache::MyPkg;
> 
> my $COM_instance;
> 
> sub handler {
> 
>    if (!$COM_instance) {
>        $COM_instance = Win32::OLE->new("ProgID.Class");
>    }
> 
> }
> 
> Will the different child processes created by Apache share the same
> variable? Or will each child create an additional instance? 

It looks like you're using Win32, so you only get one process anyway - no
children, no forking. All the other suggestions apply if you intend to be
cross platform once you switch from COM to Perl objects though.

Matt.

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

Mime
View raw message