kenahoo / Perl-Parse-CSV

Highly flexible CSV parser for large files
0 stars 4 forks source link

Cannot repeatedly parse the same csv file #4

Closed Duoxilian closed 6 years ago

Duoxilian commented 6 years ago

I found that when I attempt to parse the same csv file in a script, the parser fails. There is no obvious reset facility. Even destroying the Parse::CSV object does not seem to help, somehow the filehandle is kept open, it appears, and we return end of file at the second parse attempt.

I suggest to provide some kind of reset method or reset the parser after the end-of-file is reached.

Thanks.

Duoxilian commented 6 years ago

So sorry, cockpit error. I performed some caching which did not take into account the lack of the reset method in Parse::CSV.