Nicolas Steenlant > Catmandu-0.2002 > Catmandu::ArrayIterator

Download:
Catmandu-0.2002.tar.gz

Dependencies

Annotate this POD

CPAN RT

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

NAME ^

Catmandu::ArrayIterator - Convert an arrayref to an Iterable object

SYNOPSIS ^

    my $it = Catmandu::ArrayIterator->new([{n => 1}, {n => 2}, {n => 3}]);

    $it->[0];
    # => {n => 1}
    $it->first;
    # => {n => 1}
    $it->map(sub { $_[0]->{n} + 1 })->to_array;
    # => [2, 3, 4]

SEE ALSO ^

Catmandu::Iterable, Catmandu::Iterator

syntax highlighting: