logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Catmandu::Importer::Mock - Mock importer used for testing purposes

Configuration

       file
           Read  input  from  a  local file given by its path. Alternatively a scalar reference can be passed to
           read from a string.

       fh  Read input from an IO::Handle. If not specified, Catmandu::Util::io  is  used  to  create  the  input
           stream from the "file" argument or by using STDIN.

       encoding
           Binmode of the input stream "fh". Set to ":utf8" by default.

       fix An ARRAY of one or more fixes or file scripts to be applied to imported items.

       size
           Number of items. If not set, an endless stream is imported.

Methods

       Every Catmandu::Importer is a Catmandu::Iterable all its methods are inherited.

Name

       Catmandu::Importer::Mock - Mock importer used for testing purposes

See Also

       Catmandu::Exporter::Null

perl v5.40.0                                       2025-01-17                      Catmandu::Importer::Mock(3pm)

Synopsis

           use Catmandu;

           my $importer = Catmandu->importer('Mock');

           my $n = $importer->each(sub {
               my $hashref = $_[0];
               # ...
           });

See Also