I was doing some tests last night and I wanted to compare the databases
on two servers. First I wanted to ensure that the databases were
defined on both systems and to only transfer those that were not on the
second server from the first server.
Using the following:
$drh = DBI->install_driver("mysql");
@dbs = $drh->func("localhost:3306", '_ListDBs');
@dbs_2 = $drh->func("192.168.0.1:3306", _ListDBs');
print join ", ", @dbs;
print "\n";
print join ", ", @dbs_2;
print "\n";
the result was 2 blank lines.
The POD says that _ListDBs is useful since DBI->data_sources("mysql")
will only show for localhost. When I replaced the localhost line above
with the data_sources command, it provided the list for the local
system. I figured that $drh wasn't initialized, but I threw in a
command to see if $drh contained anything, and it was indeed a blessed
reference. Does anyone know why _ListDBs doesn't work as described in
the POD?
--
Mike Ford
Web Developer, WorkFlow Integrators, Inc.
[EMAIL PROTECTED]
www.wfiinc.com