Thank you for downloading Array::Iterator 0.06.
Please choose a download mirror from the list below to start your free download:
| Download Mirror 1 |
Array::Iterator 0.06 description
SYNOPSIS
use Array::Iterator;
# create an iterator with an array
my $i = Array::Iterator->new(1 .. 100);
# create an iterator with an array reference
my $i = Array::Iterator->new(@array);
# create an iterator with a hash reference
my $i = Array::Iterator->new({ __array__ => @array });
# a base iterator example
while ($i->hasNext()) {
if ($i->peek() < 50) {
# ... do something because
# the next element is over 50
}
my $current = $i->next();
# ... do something with current
}
# shortcut style
my @accumulation;
push @accumulation => { item => $iterator->next() } while $iterator->hasNext();
# C++ ish style iterator
for (my $i = Array::Iterator->new(@array); $i->hasNext(); $i->next()) {
my $current = $i->current();
# .. do something with current
}
# common perl iterator idiom
my $current;
while ($current = $i->getNext()) {
# ... do something with $current
}
This class provides a very simple iterator interface. It is is uni-directional and can only be used once. It provides no means of reverseing or reseting the iterator. It is not recommended to alter the array during iteration, however no attempt is made to enforce this (although I will if I can find an efficient means of doing so). This class only intends to provide a clear and simple means of generic iteration, nothing more (yet).
Array::Iterator 0.06 Free Download Copyright
New Software in Libraries
Text::MetaMarkup::HTML is a MM-to-HTML converter.
Text::Ngrams is a flexible Ngram analysis (for characters, words, and more).
bibteXML provides an XML equivalent of BibTeX.
Text::PromptBalanced aid in creating CLI prompts that keep track of balanced text.
Text::Refer can parse Unix "refer" files.
GluCat is a generic library of universal Clifford algebra templates.
License: LGPL (GNU Lesser General Public License)
Filesize: 1.4 MB
Date added: 2007-08-22
Text::Reform is a Perl module for manual text wrapping and reformatting.
Text::Scraper contains structured data from (un)structured text.
DutchPIPE is software that enables multi user, object oriented, persistent state web sites.
Text::Template::Inline allows easy formatting of hierarchical data.