use strict;
use DBI;
#probe DBI for available drivers
my @drivers = DBI->available_drivers();
##iterate through drivers and list the data source for each one
foreach my $driver (@drivers)
{
print "Driver: $driver
";
if ($driver ne "Proxy" && $driver ne "Multiplex") ##DBD:Proxy and DBD::Multiplex have problem with datasources
{
my @datasources = DBI->data_sources($driver);
foreach my $datasource (@datasources)
{
print "\tData Source is $datasource
";
}
}
print "\n";
}
####
Driver: ExampleP
Data Source is dbi:ExampleP:dir=.
Driver: Proxy
Driver: mysql