---
name: "Catmandu::Importer::Null"
section: "3pm"
platform: "linux"
package: "libcatmandu-perl"
version: "1.2024-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/Catmandu::Importer::Null"
---

# Catmandu::Importer::Null(3pm)

Null importer used for testing purposes

## NAME

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

## 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];
        # ...
    });
```

## 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.

## SEE ALSO

Catmandu::Exporter::Null
