May 2005
Intermediate to advanced
352 pages
14h 39m
English
data_sources( )
DBI->data_sources([driver, \%attributes])
This returns a list of
databases associated with a given driver. If none is specified, the
driver named in the environment variable
DBI_DRIVER is used. Attributes may be given as a
second argument.
...
my @drivers = DBI->available_drivers( );
|| die "No drivers found.";
foreach my $driver(@drivers) {
my @sources = DBI->data_sources($driver);
foreach my $source(@sources) {
print "$driver: $source\n";
}
}Read now
Unlock full access