Nicolas Steenlant > Catmandu-0.2 > Catmandu::Importer

Download:
Catmandu-0.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source   Latest Release: Catmandu-0.9208

NAME ^

Catmandu::Importer - Namespace for packages that can import

SYNOPSIS ^

    use Catmandu::Importer::JSON;

    my $importer = Catmandu::Importer::JSON->new(file => "/foo/bar.json");

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

DESCRIPTION ^

A Catmandu::Importer is a stub for Perl packages that can import data from an external source (a file, the network, ...).

Every Catmandu::Importer is a Catmandu::Fixable and thus provides a 'fix' parameter that can be set in the constructor. For every item returned by the generator the given fixes will be applied first.

METHODS ^

new(file => $file , encoding => $encoding )

new(fh => $fh)

count

each(&callback)

...

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

log

Return the current logger.

SEE ALSO ^

Catmandu::Iterable

syntax highlighting: