At 12:28 PM +0000 12/15/04, Jeff Zucker wrote:
I am thinking of extending the DBD::AnyData DSN in three ways and would appreciate comments. If these are good, there will be equivalent changes for DBD::DBM and DBD::CSV.
I can think of an additional change that would be useful while you're at it.
Update your implementation of DBI->data_sources() so that it is smarter. Currently, DBI::DBM returns a value for each physical sub-directory in the current directory regardless of whether it is a DBM database or not.
Unfortunately, I don't see any way to do that. Some DBM implementations have different file naming conventions. For AnyData and CSV, files can be named anything. Even if we could recognize the names of the files we wouldn't necessarily know which DBM type created the file so there'd be no way to know if a connection would succeed without trying many different combinations of dbm_type, mldbm_type, etc. Basically, if the user keeps only files of a specified type in specified directories, then data_sources() and tables() will be useful, otherwise not. I don't see a way around it.
-- Jeff