Iterator::Flex

Note! "Iterator::Flex" is alpha quality software.

  What is It?

"Iterator::Flex" provides iterators that can:

*   rewind to the beginning, keeping track of state (e.g. cycles which
    always know the previous value).

*   reset to the initial state

*   serialize, so that you can restart from where you left off,

*   signal exhaustion by returning a sentinel value (e.g. "undef") or
    throwing an exception, and provide a test for exhaustion via the
    "is_exhausted" method.

*   wrap existing iterators so that they have the same exhaustion
    interface as your own iterators

*   provide history via "prev" and "current" methods.

These are *optional* things behaviors that an iterator can support. Not
all iterators need the bells and whistles, but sometimes they are very
handy.

  Where are the iterators?

See Iterator::Flex::Common for a set of common iterators. These are
pre-made for you. See Iterator::Flex::Manual::Using for how to use them.

  I need to write my own.

See Iterator::Flex::Manual::Authoring for how to write your own flexible
iterators.

See Iterator::Flex::Manual::Internals for how everything links together.

  Show me the Manual

Iterator::Flex::Manual

  What doesn't work?  What should frighten me away?

Iterator::Flex::Manual::Caveats

INSTALLATION

This is a Perl module distribution. It should be installed with whichever
tool you use to manage your installation of Perl, e.g. any of

  cpanm .
  cpan  .
  cpanp -i .

Consult http://www.cpan.org/modules/INSTALL.html for further instruction.
Should you wish to install this module manually, the procedure is

  perl Build.PL
  ./Build
  ./Build test
  ./Build install

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