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

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

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

BugTracker
Severity:
Normal
Broken in:
0.43
Fixed in:
0.83



Subject: Uninitialized value with bind_columns and auto_diag
If error_diag throws an error from bind_columns, you don't want/need the noise from an uninitialized value warning to go along with it: use strict; use warnings; use Text::CSV_XS; my $input = <<EOT; a,b,c,d e,f,g,h EOT my $r = eval { main() }; unless ($r) { print "Got an error [$@]\n"; } sub main { my @cols = 1..3; my $csv = Text::CSV_XS->new ({ binary => 1, eol => $/, auto_diag => 2}); my %row; $csv->bind_columns(\@row{@cols}); open(my $fh, "<", \$input) or die "Err: $!"; while ( $csv->getline($fh) ) { print "Got: ", join("|", @row{@cols}), "\n"; } return 1; } # Output: Use of uninitialized value in concatenation (.) or string at .../Text/CSV_XS.pm line 363, <$fh> line 1. Got an error [# CSV_XS ERROR: 3006 - EHR - bind_columns () did not pass enough refs for parsed fields @ pos ]
Subject: Re: [rt.cpan.org #69673] Uninitialized value with bind_columns and auto_diag
Date: Tue, 2 Aug 2011 09:22:47 +0200
To: bug-Text-CSV_XS@rt.cpan.org
From: "H.Merijn Brand" <h.m.brand@xs4all.nl>
On Thu, 21 Jul 2011 16:10:29 -0400, "Douglas Wilson via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote:
Show quoted text
> If error_diag throws an error from bind_columns, you don't want/need the > noise from an uninitialized value warning to go along with it:
Now fixed/patched. Will be in version 0.83 -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00, 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
commit a248f6c9444997ba75ecfa0b981a653e52485e5b was the cause.


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.