Closed ugexe closed 5 months ago
Sorry for the delay. PTS happened and then I was Ill. I think I just pushed the fix. Thanks for reporting!
Your code used Text::CSV
instead of Text::CSV_XS
. I resolved that as
use 5.026002;
use warnings;
use Text::CSV_XS;
my $data = <<"EOC";
a,b,c
d,e
f,g,h
EOC
my $csv = Text::CSV_XS->new ({ strict => 1, auto_diag => 2 });
my ($foo, $bar, $baz);
$csv->bind_columns (\$foo, \$bar, \$baz);
open my $fh, "<", \$data;
while (my $status = $csv->getline ($fh)) {
say "Line parsed: foo = $foo, bar = $bar, baz = $baz";
}
$csv->error_input () and
warn "Error parsing CSV: ", $csv->error_diag (), "\n";
I have to wait for my new laptop to make a release
Someone found yet another issue with strict
, so I want to resolve that before a new release. Please be a bit more patient
1.55 is out
Previously when strict was used with bind_columns, an error would be raised if the number of fields for a row didn't match the number of fields for the previous rows:
As of the 1.54 release this behavior has changed: