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

Report information
The Basics
Id:
95787
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
justin [...] jacp1.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.41
Fixed in:
1.09



Subject: csv2xls replaces 0 with blank cells?
Date: Mon, 19 May 2014 23:17:22 +0100
To: bug-Text-CSV_XS@rt.cpan.org
From: Justin Powell <justin@jacp1.com>
My csv2xls seems to replace plain 0 in a tab separated file with a blank cell in the xls output. This seems to be due to the line:
 
my $val = $row[$c] || "";
 
Best regards,
 
Justin
Subject: Re: [rt.cpan.org #95787] csv2xls replaces 0 with blank cells?
Date: Tue, 20 May 2014 07:50:18 +0200
To: bug-Text-CSV_XS@rt.cpan.org
From: "H.Merijn Brand" <h.m.brand@xs4all.nl>
On Mon, 19 May 2014 18:17:41 -0400, "Justin Powell via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote:
Show quoted text
> My csv2xls seems to replace plain 0 in a tab separated file with a blank > cell in the xls output. This seems to be due to the line: > > my $val = $row[$c] || "";
That should have been my $val = $row[$c] // ""; but 5.6.x does not support defined-or and 5.8.x does not without a patch. That line is in there since 0.41 (2008). Funny that it only showed now. Changed to my $val = defined $row[$c] ? $row[$c] : ""; Will be in next release. Thanks for the report. -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.19 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.