Re: Same $dbh under different pids?

2002-10-30 Thread Perrin Harkins
Mrs. Brisby wrote: $ perl -e '$foo = {}; fork; print "$$:$foo\n";' 18161:HASH(0x80fd254) 18162:HASH(0x80fd254) $ perl -e 'fork; $foo = {}; print "$$:$foo\n";' 18163:HASH(0x80fd254) 18164:HASH(0x80fd254) I expected the first. I didn't expect the second. Thanks for the explanation. - Perrin

Re: Same $dbh under different pids?

2002-10-30 Thread James G Smith
Perrin Harkins <[EMAIL PROTECTED]> wrote: >harm wrote: > >>On Wed, Oct 30, 2002 at 06:05:51PM +0800, Philippe M. Chiasson wrote: >> >> >>>For the same reason that running this: >>>$> perl -e'fork; { $foo = {}; print "$$:$foo\n"}' >>>1984:HASH(0x804c00c) >>>1987:HASH(0x804c00c) >>> >>>produces thi

Re: Same $dbh under different pids?

2002-10-30 Thread Mrs. Brisby
On Wed, 2002-10-30 at 14:52, Perrin Harkins wrote: > harm wrote: > > >On Wed, Oct 30, 2002 at 06:05:51PM +0800, Philippe M. Chiasson wrote: > > > > > >>For the same reason that running this: > >>$> perl -e'fork; { $foo = {}; print "$$:$foo\n"}' > >>1984:HASH(0x804c00c) > >>1987:HASH(0x804c00c) >

Re: Same $dbh under different pids?

2002-10-30 Thread Perrin Harkins
harm wrote: On Wed, Oct 30, 2002 at 06:05:51PM +0800, Philippe M. Chiasson wrote: For the same reason that running this: $> perl -e'fork; { $foo = {}; print "$$:$foo\n"}' 1984:HASH(0x804c00c) 1987:HASH(0x804c00c) produces this for me, every single time I run this program You are assuming tha

Re: Same $dbh under different pids?

2002-10-30 Thread harm
On Wed, Oct 30, 2002 at 06:05:51PM +0800, Philippe M. Chiasson wrote: > For the same reason that running this: > $> perl -e'fork; { $foo = {}; print "$$:$foo\n"}' > 1984:HASH(0x804c00c) > 1987:HASH(0x804c00c) > > produces this for me, every single time I run this program > > You are assuming that

Re: Same $dbh under different pids?

2002-10-30 Thread harm
On Tue, Oct 29, 2002 at 09:06:45PM +, Richard Clarke wrote: > >Moi, > > > >a quick question: is it possible to have the 'same' dbh across the apache > >children even if you do your best not to? > > > >This minimalistic handler: > >use strict; > >package Foo; > >use Apache::DBI; > >use DBI; > >u

Re: Same $dbh under different pids?

2002-10-29 Thread Richard Clarke
harm wrote: Moi, a quick question: is it possible to have the 'same' dbh across the apache children even if you do your best not to? This minimalistic handler: use strict; package Foo; use Apache::DBI; use DBI; use Apache::Constants qw':common'; my $dbh; You haven't initialised this, so each

Same $dbh under different pids?

2002-10-29 Thread harm
Moi, a quick question: is it possible to have the 'same' dbh across the apache children even if you do your best not to? This minimalistic handler: use strict; package Foo; use Apache::DBI; use DBI; use Apache::Constants qw':common'; my $dbh; $Apache::DBI::DEBUG = 1; sub handler { my $r = sh