Subject: | combine() fails when passed values from tied hash |
When passed values from a tied hash, combine() inserts empty strings
instead:
#!/usr/bin/perl
use strict;
use warnings;
use Text::CSV_XS;
use Tie::IxHash;
for my $tie (0, 1) {
my %hash;
tie %hash, 'Tie::IxHash' if $tie;
%hash = qw/ a b c d e f /;
my $csv = Text::CSV_XS->new({eol => "\n"});
$csv->combine(values %hash);
print $tie ? 'tied' : 'not tied', '=', $csv->string;
}
not tied=f,d,b
tied=,,
Text-CSV_XS-0.42
perl v5.8.7
Linux 2.6.16.29-xen #1 SMP Sun Sep 30 04:00:13 UTC 2007 x86_64 GNU/Linux