Iterator::Flex::Factory - Create on-the-fly Iterator::Flex classes/objects
version 0.12
$iter = Iterator::Flex::Factory->to_iterator( $iterable, \%par );
Construct an iterator from an iterable thing, with optional general parameters.
$iterator = Iterator::Flex::Factory->construct( \%interface_pars, \%signal_pars );
Construct an iterator object from the passed hash of interface parameters and signal parameters
$iter = Iterator::Flex::Factory->construct_from_iterable( $iterable, \%pars );
Construct an iterator from an "iterable thing" in Iterator::Flex::Manual::Glossary. The returned iterator will return undef upon exhaustion.
undef
If $iterable is:
$iterable
an object, the arguments are passed to "construct_from_object".
an array, the arguments are passed to "new" in Iterator::Flex::Array.
a coderef, the arguments are passed to "construct".
a globref, the arguments are passed to "construct".
$iter = Iterator::Flex::Factory->construct_from_array( $array_ref, ?\%pars );
$iter = Iterator::Flex::Factory->construct_from_object( $object, %parameters );
Construct an iterator from an "iterable object" in Iterator::Flex::Manual::Glossary. Normal use is to call "to_iterator", "construct_from_iterable" or simply use "iter" in Iterator::Flex.
If the object has the following methods, they are used by the constructed iterator:
__prev__
prev
__current__
current
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
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.