Subject: | clone with \%attr, and next clone return undef |
reproduce code:
------------------------------
use DBI;
use Data::Dumper;
my $dbh = DBI->connect('dbi:mysql:database=sandbox', 'sandbox', 'sandbox');
$dbh = $dbh->clone({});
warn Dumper($dbh);
$dbh = $dbh->clone();
warn Dumper($dbh);
-----------------------------
output:
----------------------------
$VAR1 = bless( {}, 'DBI::db' );
$VAR1 = undef;
----------------------------
if s/clone({})/clone()/
then output is:
----------------------------
$VAR1 = bless( {}, 'DBI::db' );
$VAR1 = bless( {}, 'DBI::db' );
----------------------------