robbiebow / Text-CSV-Slurp

Text::CSV::Slurp - lazy CSV handling in Perl
1 stars 5 forks source link

CSV file is not correctly parsed from string #5

Closed tomas-zemres closed 8 years ago

tomas-zemres commented 8 years ago

I am not able parse file using: Text::CSV::Slurp->load(string => $csv_data);

I must use workaround (it parses $csv_data correctly): Text::CSV::Slurp->load(filehandle => IO::Scalar->new(\$csv_data));

There is probably bug on line 41: https://github.com/babf/Text-CSV-Slurp/blob/master/lib/Text/CSV/Slurp.pm#L41

because it does not reflect correct "end of lines" it may be "\n", "\r", "\r\n" (or maybe anything else).

ghost commented 8 years ago

Please create some tests, make the necessary changes in a fork and give me a pull request. Thanks in advance.

ghost commented 8 years ago

Thanks for the patch - have released it in 1.03!