On 5/9/07, Jeff Pang <[EMAIL PROTECTED]> wrote: snip
But still has a question for me.We may see this similiar destroy method on DBI class,sub DESTROY { my $self = shift; my $dbh = $self->{'dbh'}; if ($dbh) { local $SIG{'__WARN__'} = sub {}; $dbh->disconnect(); } } Ok where in child when going out of scope the $dbh should get disconnected. But why this would affect the $dbh in parent?As we know,when forking child get a full copy of $dbh from parent and it's separate to parent's $dbh.
snip But the connection information in the $dbh is the same, so when the child disconnects it tells the MySQL server to destroy the connection. This means that the parent loses its connection unexpectedly. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/
