Catmandu::Importer::Null - Null importer used for testing purposes
Contents
Description
The importer generates one empty record and then exists. This importer can be used to test fix functions,
generating a single record.
Methods
Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited.
Name
Catmandu::Importer::Null - Null importer used for testing purposes
See Also
Catmandu::Exporter::Null
perl v5.40.0 2025-01-17 Catmandu::Importer::Null(3pm)
Synopsis
# From the command line
catmandu convert Null --fix 'add_field(foo,bar)'
# creates { "foo": "bar" }
# In a Perl script
use Catmandu;
my $importer = Catmandu->importer('Null');
my $n = $importer->each(sub {
my $hashref = $_[0];
# ...
});
