Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Parse-CSV CPAN distribution.

Report information
The Basics
Id: 27468
Status: open
Priority: 0/
Queue: Parse-CSV

People
Owner: Nobody in particular
Requestors: MARKSTOS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: 1.00



Subject: PATCH: typo fixes and better error reporting
When there was an error, there was no way to get to the underlying "error_input" method. This patch adds that to the "errstr" output, and cleans up a few typos of "CVS" as well. (I do the same thing!). Mark
Subject: typo_and_error_message.patch
Wed Jun 6 14:02:10 EDT 2007 Mark Stosberg <mark@summersault.com> * Parse::CSV improvements. fix "CVS" typos and return a more useful error message. diff -rN -u old-museum-resources-alphasite/perllib/Parse/CSV.pm new-museum-resources-alphasite/perllib/Parse/CSV.pm --- old-museum-resources-alphasite/perllib/Parse/CSV.pm 2007-06-06 14:03:52.000000000 -0400 +++ new-museum-resources-alphasite/perllib/Parse/CSV.pm 2007-06-06 14:03:52.000000000 -0400 @@ -4,7 +4,7 @@ =head1 NAME -Parse::CSV - Highly flexible CVS parser for large files +Parse::CSV - Highly flexible CSV parser for large files =head1 SYNOPSIS @@ -39,7 +39,7 @@ but unfortunately it can be a bit verbose to use. A number of other modules have attempted to put usability wrappers around -this venerable module, but they have all focussed on parsing the entire +this venerable module, but they have all focused on parsing the entire file into memory at once. This method is fine unless your CSV files start to get large. Once that @@ -298,7 +298,8 @@ while ( defined(my $line = $self->_getline) ) { # Parse the line into columns unless ( $self->{csv_xs}->parse($line) ) { - $self->{errstr} = "Failed to parse row $self->{row}"; + $self->{errstr} = "Failed to parse row $self->{row}.\n " + ."Error input was: ".$self->{csv_xs}->error_input; return undef; } @@ -390,7 +391,7 @@ =head2 string - $line = $cvs->string; + $line = $csv->string; The C<string> method is provided as a convenience, and is passed through to the underlying L<Text::CSV_XS> object. @@ -405,7 +406,7 @@ =head2 print - $status = $cvs->print($io, $columns); + $status = $csv->print($io, $columns); The C<print> method is provided as a convenience, and is passed through to the underlying L<Text::CSV_XS> object.
Spelling mistakes fixed, considering the error message change
Adam & Mark - I imported the Parse::CSV code to GitHub: https://github.com/kenahoo/Perl-Parse-CVS . The lines referenced in this patch are no longer there, is there a new patch that could be applied, or is it no longer relevant?
On Sat Oct 11 13:47:37 2014, KWILLIAMS wrote: Show quoted text
> Adam & Mark - I imported the Parse::CSV code to GitHub: > https://github.com/kenahoo/Perl-Parse-CVS . The lines referenced in > this patch are no longer there, is there a new patch that could be > applied, or is it no longer relevant?
Oops, typo in repo name - it's https://github.com/kenahoo/Perl-Parse-CSV (CSV, not CVS).