H.Merijn Brand wrote:
Attached patch implements the following:

  f_dir => "/data/csv/foo",
  f_ext => ".csv",
  f_ext => ".csv/i",  # Case ignore on extension, use given on write
  f_ext => ".csv/r",  # Extension is required, ignore other files in
  f_ext => ".csv/ri", #  f_dir. Options can be combined

I find that overly complicated, doesn't solve much, and could be done easily with a single loop statement in Perl. The case stuff I would find particularly confusing since f_dir and file names (not table names) will need to remain case sensitive on *nix regardless of what you do with the sensitivity of the extension - SQL table names must remain insensitive in all cases so this method of treating a filename as a tablename would make the entire situation quite confusing. The reason I say it doesn't solve much is that it only really works if you have a single CSV format (e.g. if you have files that use a semi-colon eol you'll need to specify them with $dbh->{csv_tables} attribute anyway. Also it doesn't solve the issue of finding a list of tables - a fuller patch would connect the specifiying of f_dir and f_ext with the $dbh->tables() method. I guess my main approach is that filenames and tablenames are two different things and that this patch obscures that whereas most users will be better off by realizing that they are better off making an explicit association between file names and table names with $dbh->{csv_tables}->{file}. So, let me think about this patch, I'm not ready to decide today. I will definitely apply your previous patches from rt, thanks for those.

TIM or others - what do you think?

Also, thanks for your offer to take over DBD:CSV. I may sometime take you up on that but am not ready yet, I'd prefer to keep it as long as I have DBD::File, DBD::AnyData, and SQL::Statement since they are all so intimately related. Is there a way we can be co-maintainers? Can I give you PAUSE uploading rights so that you could directly upload patches we both agree are good changes?

Thanks for your improvements to the module.

--
Jeff

Reply via email to