22 lines
467 B
Perl
22 lines
467 B
Perl
#!/usr/bin/perl
|
|
use warnings;
|
|
use strict;
|
|
use DBI;
|
|
|
|
my @drivers=DBI->available_drivers('quiet');
|
|
my @sources;
|
|
foreach my $driver (@drivers) {
|
|
print "$driver\n";
|
|
@sources=eval {
|
|
DBI->data_sources($driver)
|
|
};
|
|
if ($@) {
|
|
print "\tError: ",substr($@,0,60),"\n";
|
|
} elsif (@sources) {
|
|
foreach (@sources) {
|
|
print "\t$_\n";
|
|
}
|
|
} else {
|
|
print "\tNo known data sources\n";
|
|
}
|
|
} |