Access the answers to your technology questions today.
Subscribe Now
30-day free trial. Register in 60 seconds.
What Makes Experts Exchange Unique?
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.
Try it out and discover for yourself.
Subscribe Now
30-day free trial. Register in 60 seconds.
Join the Community
Give a Little. Get a Lot.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Join the Community
by: xaniusPosted on 2006-06-11 at 23:59:42ID: 16883500
Lil,
calhost", "user1010", "p10s45gf", \%attr);
I think the connect in get_db_connection is not working, returning undef. Therefore $DBH is undef and not a DBI-Blessed object, hence the error. You should generally handle errors when communicating with processes outside perl (mysql in this case). either set the PrintError and/or RaiseError to 1 or check the DBI-errors after the database connection.
The following modification of get_db_connection shoudl give you the first clues:
sub get_db_connection
{
my %attr = (
PrintError => 1,
RaiseError => 1
);
my $DBH = DBI->connect("DBI:mysql:lo
# $DBH->{PrintError} = 1;
return $DBH;
}
# Cheers
# Xanius