Iterator::Flex::Manual::Using - How to use an Iterator::Flex iterator
version 0.12
The first thing to do is to construct one. Iterator::Flex::Common provides a number of easy-to-use front-ends, so
Not all iterators support all methods.
$value = $iter->prev;
Returns the previous value of the iterator. If the iterator was never advanced, this returns undef. If the iterator is exhausted, this returns the last retrieved value.
undef
$value = $iter->current;
Returns the current value of the iterator. If the iterator was never advanced, this returns undef. If the iterator is exhausted, this returns undef.
$value = $iter->next;
Return the next value from the iterator.
$iter->rewind;
Resets the iterator so that the next value returned is the very first value. It should not affect the results of the "prev" and "current" methods.
$iter->reset;
Resets the iterator to its initial state. The iterator's state is not changed.
$iter->is_exhausted;
True if the iterator is in the exhausted state.
$iter->is_error;
True if the iterator is in the error state.
Please report any bugs or feature requests to bug-iterator-flex@rt.cpan.org or through the web interface at: https://rt.cpan.org/Public/Dist/Display.html?Name=Iterator-Flex
Source is available at
https://gitlab.com/djerius/iterator-flex
and may be cloned from
https://gitlab.com/djerius/iterator-flex.git
Please see those modules/websites for more information related to this module.
Iterator::Flex
Iterator::Flex::Manual
Diab Jerius <djerius@cpan.org>
This software is Copyright (c) 2018 by Smithsonian Astrophysical Observatory.
This is free software, licensed under:
The GNU General Public License, Version 3, June 2007
To install Iterator::Flex, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Iterator::Flex
CPAN shell
perl -MCPAN -e shell install Iterator::Flex
For more information on module installation, please visit the detailed CPAN module installation guide.