Catmandu::Importer::Mock(3pm)

Catmandu::Importer::Mock3pm

Mock importer used for testing purposes

Usage

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

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.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

From libcatmandu-perl 1.2024-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.