Re: forking problem with dbd::mysql On 5/9/07, Chas Owens  wrote:
snip
> It looks like it has something to do with $dbh going out of scope
> (when the child exits).
snip

This is definitely a case of the database handle auto-disconnecting
when it is destroyed.  You can see the behavior by creating a set of
DBI subclasses and overriding the DBI::db::destroy function.  Change
the DBI->connect call to MyDBI->connect and add these lines to the
bottom of the script.

package MyDBI;

use base 'DBI';

package MyDBI::st;

use base 'DBI::st';

package MyDBI::db;

use base 'DBI::db';

sub DESTROY {
        return 0;
}

-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


