Hi all,
This is cross-post, I first posted it to begginers list, I got answer
that someone has the same error, so I'm posting this to mailinglist,
maybe someone elso could confirm this and after send this to
dbi-developers | report DBI bug
Here is problem: I get error:
Attempt to free unreferenced scalar: SV 0x1e166a0, Perl interpreter: 0x3417c at
D:/Perl/lib/Errno.pm line 15.
while running this script, could anybody helps me ?
use strict;
use warnings;
use DBI;
use WWW::Mechanize;
my $dbh = DBI->connect("DBI:mysql:database=test;host=localhost;port=3306",
"2ge", "",
{RaiseError => 1} ) or die "Can't connect: ", $DBI::errstr;
my $mech = WWW::Mechanize->new();
mech->agent_alias('Windows IE 6');
my $sth_get_links = qq{ select id, url from links
where follow = 1
limit 1
};
my $a = $dbh->selectall_hashref($sth_get_links, 'id');
while ( my($link_id, $value) = each(%$a) ) {
print "getting $value->{url}\n";
$mech->get( $value->{url} );
}
$dbh->disconnect;
__END__
Fix is not using selectall_hashref(), but I don't think this is
actually fix, it is just workaround. Could someone else confirm this?
perl, v5.8.6 built for MSWin32-x86-multi-thread
DBI -- 1.46
DBD::mysql -- 2.9004
/brano