Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

Report information
The Basics
Id: 45078
Status: resolved
Priority: 0/
Queue: Text-CSV-Encoded

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

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



Subject: Text::CSV::Encode issues warning on empty values
Hi, Text::CSV::Encoded::Coder::Encode throws warnings when one tries to process datasets with empty values. I'd assume that empty (NULL) values are valid values when used in CSV files and therefore, also using Text-CSV-Encoded should not throw an exception. I have fixed this for me by encapsulating the relevant 'encode' function into an 'if ($_) {...}' block. => I have replaced procedure "encode_fields_ref' by sub encode_fields_ref { my ( $self, $encoding, $arrayref ) = @_; my $enc = $self->find_encoding($encoding) || return; for (@$arrayref) { if ($_) { $_ = $enc->encode($_); } } } I think this could be fixed in general for the next release. :-) Cheers, Thomas PS: Thanks for this module, saved me lot of work.
Thanks for your report. The modified version was released. Regards,