Subject: | wishlist: print_hr |
Date: | Thu, 29 Mar 2012 15:14:32 +0100 |
To: | "bug-Text-CSV_XS [...] rt.cpan.org" <bug-Text-CSV_XS [...] rt.cpan.org> |
From: | Carl Johnstone <Carl.Johnstone [...] onthebeach.co.uk> |
Would it be possible to add a print_hr method to match the getline_hr method?
I see it working something like this:
sub print_hr {
my ($self, $handle, $hashref) = @_;
my @out_ary;
foreach my $col ($self->column_names) {
my $val = undef;
if (exists $hashref->{$col} ) {
$val = $hashref->{$col}
}
push(@out_ary,$val);
}
$self->print($handle, \@out_ary);
}
Thanks
Carl