Catmandu::ArrayIterator - Convert an arrayref to an Iterable object
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]
Catmandu::Iterable, Catmandu::Iterator
To install Catmandu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catmandu
CPAN shell
perl -MCPAN -e shell install Catmandu
For more information on module installation, please visit the detailed CPAN module installation guide.