The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Iterator::Flex::Manual::Using - How to use an Iterator::Flex iterator

VERSION

version 0.12

DESCRIPTION

Construction

The first thing to do is to construct one. Iterator::Flex::Common provides a number of easy-to-use front-ends, so

Iteration

Exhaustion

Errors

METHODS

Not all iterators support all methods.

prev
  $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.

current
  $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.

next
  $value = $iter->next;

Return the next value from the iterator.

rewind
  $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.

reset
  $iter->reset;

Resets the iterator to its initial state. The iterator's state is not changed.

is_exhausted
  $iter->is_exhausted;

True if the iterator is in the exhausted state.

is_error
  $iter->is_error;

True if the iterator is in the error state.

SUPPORT

Bugs

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

Source is available at

  https://gitlab.com/djerius/iterator-flex

and may be cloned from

  https://gitlab.com/djerius/iterator-flex.git

SEE ALSO

Please see those modules/websites for more information related to this module.

AUTHOR

Diab Jerius <djerius@cpan.org>

COPYRIGHT AND LICENSE

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