B::Foreach::Iterator - Manipulates foreach iterators
This document describes B::Foreach::Iterator version 0.07.
use B::Foreach::Iterator; foreach my $key(foo => 10, bar => 20, baz => 30){ printf "%s => %s\n", $key => iter->next; }
B::Foreach::Iterator provides functions that manipulate foreach iterators.
B::Foreach::Iterator
foreach
Finds a foreach iterator, and returns it. You can supply a $label if necessary.
If no iterators are found, it dies.
Increases $iterator and returns its value.
Returns the value of the next iterator.
Returns whether the foreach loop iteration is last or not.
Returns the label of $iterator.
If $iterator has no labels, it returns undef.
undef
Perl 5.8.8 or later, and a C compiler.
No bugs have been reported.
Please report any bugs or feature requests to the author.
perlguts.
pp_hot.c for pp_iter().
pp_iter()
cop.h for struct block_loop and struct context.
struct block_loop
struct context
Goro Fuji <gfuji(at)cpan.org>.
Thanks to Hans Dieter Pearcey(HDP) for his suggestions.
Copyright (c) 2009, Goro Fuji. Some rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install B::Foreach::Iterator, copy and paste the appropriate command in to your terminal.
cpanm
cpanm B::Foreach::Iterator
CPAN shell
perl -MCPAN -e shell install B::Foreach::Iterator
For more information on module installation, please visit the detailed CPAN module installation guide.