Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Fellow monks, consider the following code and output:
#!/usr/bin/perl use strict; use warnings; use DBI; my @db_drivers = DBI->available_drivers(); foreach my $db_driver (@db_drivers) { print "$db_driver\n"; my @data_sources = DBI->data_sources($db_driver); print "\t", join(", ",@data_sources), "\n"; }
Output:
$ perl DBI_data_sources.pl DBM DBI:DBM:f_dir=. ExampleP dbi:ExampleP:dir=. File DBI:File:f_dir=. Gofer Proxy SQLite Sponge
I am aware of DBI->data_sources
"Note that many drivers have no way of knowing what data sources might be available for it. These drivers return an empty or incomplete list or may require driver-specific attributes."and would like to see a real world (tm) example output with defined values for data_sources.
Thanks.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Is DBI->data_sources($db_driver) useless?
by roboticus (Chancellor) on Mar 11, 2009 at 20:42 UTC | |
|
Re: Is DBI->data_sources($db_driver) useless?
by jethro (Monsignor) on Mar 11, 2009 at 20:54 UTC | |
|
Re: Is DBI->data_sources($db_driver) useless?
by trwww (Priest) on Mar 12, 2009 at 02:19 UTC | |
|
Re: Is DBI->data_sources($db_driver) useless?
by mje (Curate) on Mar 12, 2009 at 11:22 UTC |