Subject: | $sth->{Database} gets messed when destroying related $dbh |
DBI-1.48
DBD-mysql-2.9008
Perl: This is perl, v5.8.6 built for i686-linux-thread-multi
Slackware Linux: Linux developer 2.4.23 #1 Thu Dec 4 11:45:45 MSK 2003 i686 unknown
The following script prints:
$VAR1 = \'Database';
but should print something like
$VAR1 = bless( {}, 'DBI::db' );
It seems that internal reference to ::db structure gets unexpectedly DESTROYed/messed up.
================================
#!perl
use strict;
use warnings FATAL => 'all';
use Data::Dumper;
use DBI;
my $sth;
{
my $dbh;
$dbh = DBI->connect('dbi:mysql:dbname=test;host=my.host;port=3306', 'user', 'pass');
$sth = $dbh->prepare('SELECT asd FROM');
};
print Dumper( $sth->{'Database'} );