Subject: | PP behavior is different from XS when getline broken CSV |
The attached script uses 1 getline($fh) for broken CSV string and then
print position of $fh and size of CSV string size.
result of PP: 49 212
result of XS: 212 212
If the column like 'aaaa"' exists, PP seems to parse CSV from the point to
end of file.
Text::CSV version is 1.21
Text::CSV_XS version is 0.85
Subject: | csv.pl |
use Text::CSV;
use strict;
my $data = join "", <DATA>;
open my $fh, '<', \$data;
my $csv = Text::CSV->new({eol => "\n"});
my $col = $csv->getline($fh);
print join "\t", tell $fh, length($data);
__END__
hhhhhh","iiiiiiiiiiiiiiiiiiiii","jjjjjjjjjjjjjj"
"eeeee","fffffffffff","ggggggggg"
"llllllllllllllllllllllllllll","mmmmm","n"
"llllllllllllllllllllllllllll","mmmmm","n"
"llllllllllllllllllllllllllll","mmmmm","n"