LibreCat / Catmandu

Catmandu - a data processing toolkit
https://librecat.org
175 stars 31 forks source link

TSV exporter does not use its 'fh' parameter #363

Closed jajm closed 5 years ago

jajm commented 5 years ago

Sample code to reproduce the issue:

use Catmandu;
use Catmandu::Sane;
use File::Temp;

my $exporter = Catmandu->exporter('TSV', fh => File::Temp->new());
$exporter->add({foo => 'bar'});
$exporter->commit;

Instead of writing to the temporary file, it will print to STDOUT.

nics commented 5 years ago

Hi, you should use the file parameter

jajm commented 5 years ago

Hi, you should use the file parameter

Thanks, that works.