Catmandu::Exporter::Text
a Text exporter
- Provided by: libcatmandu-perl (Version: 1.1000-2)
- Report a bug
a Text exporter
# From the command line
# Write all field values as a line of Text
$ catmandu convert JSON to Text --field_sep "," < data.json
# In a Perl script
use Catmandu;
# Print to STDOUT
my $exporter = Catmandu->exporter('Text', fix => 'myfix.txt');
# Print to file or IO::Handle
my $exporter = Catmandu->exporter('Text', file => '/tmp/out.yml');
my $exporter = Catmandu->exporter('Text', file => $fh);
$exporter->add_many($arrayref);
$exporter->add_many($iterator);
$exporter->add_many(sub { });
$exporter->add($hashref);
printf "exported %d items\n" , $exporter->count;
This "Catmandu::Exporter" exports items as raw text. All field values found in the data will be contactenated using "field_sep" as delimiter.
Catmandu::Exporter , Catmandu::Importer::Text