I have been digging a bit to find what people consider loose ends in
Text::CSV_XS, and tried to summarize that (in no particular order) in
the new TODO list. Here "TODO" gives no guarantee that it will be done,
nor on any implementation or API that it might suggest, it is there now
just so I/we do not forget to think about these issues.

I'd like to get thoughts/feedback/suggestions about items on this list,
and how valuable you consider adding these features to a modules so
heavily used by other applications.

Jochen asked me to also post to this list, cause many DBI users (have
to) deal with CSV data. So start shooting ...

=head1 TODO

=over 2

=item eol

Discuss an option to make the eol honor the $/ setting. Maybe

  my $csv = Text::CSV_XS->new ({ eol => $/ });

is already enough, and new options only make things less opaque.

=item setting meta info

Future extensions might include extending the C<fields_flags ()>,
C<is_quoted ()>, and C<is_binary ()> to accept setting these flags
for fields, so you can specify which fields are quoted in the
combine ()/string () combination.

  $csv->meta_info (0, 1, 1, 3, 0, 0);
  $csv->is_quoted (3, 1);

=item parse returning undefined fields

Adding an option that enables the parser to distinguish between
empty fields and undefined fields, like

  $csv->quote_always (1);
  $csv->allow_undef (1);
  $csv->parse (qq{,"",1,"2",,""});
  my @fld = $csv->fields ();

Then would return (undef, "", "1", "2", undef, "") in @fld, instead
of the current ("", "", "1", "2", "", "").

=item combined methods

Adding means (methods) that combine C<combine ()> and C<string ()> in
a single call. Likewise for C<parse ()> and C<fields ()>.

=item Unicode

Make C<parse ()> and C<combine ()> do the right thing for Unicode
(UTF-8) if requested. See t/50_utf8.t.

=item Space delimited seperators

Discuss if and how C<Text::CSV_XS> should/could support formats like

   1 , "foo" , "bar" , 3.19 ,

=item Double double quotes

There seem to be applications around that write their dates like

   1,4,""12/11/2004"",4,1

If we would support that, in what way?

=item Parse the whole file at once

Implement a new methods that enables the parsing of a complete file
at once, returning a lis of hashes. Possible extension to this could
be to enable a column selection on the call:

   my @AoH = $csv->parse_file ($filename, { cols => [ 1, 4..8, 12 ]});

Returning something like

   [ { fields => [ 1, 2, "foo", 4.5, undef, "", 8 ],
       flags  => [ ... ],
       errors => [ ... ],
       },
     { fields => [ ... ],
       .
       .
       },
     ]

=back

I'll try to keep the most current snapshot available as

        http://www.xs4all.nl/~hmbrand/Text-CSV_XS-0.27.tar.gz

Until I release 0.27, after which I'll use 0.28 for the snapshot :)

-- 
H.Merijn Brand         Amsterdam Perl Mongers (http://amsterdam.pm.org/)
using & porting perl 5.6.2, 5.8.x, 5.9.x   on HP-UX 10.20, 11.00, 11.11,
& 11.23, SuSE 10.0 & 10.2, AIX 4.3 & 5.2, and Cygwin. http://qa.perl.org
http://mirrors.develooper.com/hpux/            http://www.test-smoke.org
                        http://www.goldmark.org/jeff/stupid-disclaimers/

Reply via email to