NAME
Iterator::Flex::Base - Iterator object
VERSION
version 0.13
METHODS
_is_iterator
$class->_is_iterator( $obj );
Returns true if an object is an iterator, where iterator is defined as
An object which inherits from Iterator::Flex::Base.
__iter__
$sub = $iter->__iter__;
Returns the subroutine which returns the next value from the iterator.
may
$bool = $iter->may( $method );
Similar to can, except it checks that the method can be called on the iterators which $iter
depends on. For example, it's possible that $iter
implements a rewind
method, but that it's dependencies do not. In that case can will return true, but may
will return false.
_namespaces
@namespaces = $class->_namespaces;
Returns a list of namespaces to search for classes. When called on the base class, this returns
Iterator::Flex
_role_namespaces
@namespaces = $class->_role_namespaces;
Returns a list of namespaces to search for roles. When called on the base class, returns
Iterator::Flex::Role
_add_roles
$class->_add_roles( @roles );
Add roles to the class. If the name begins with a +
, it is assumed to be a fully qualified name, otherwise it is searched for in the namespaces returned by the _role_namespaces
class method.
is_exhausted
An object method which returns true if the iterator is in the exhausted state
set_exhausted
Internal method.
An object method which sets the iterator state status to exhausted.
It does not signal exhaustion.
is_error
An object method which returns true if the iterator is in the error state
set_error
Internal method.
An object method which sets the iterator state status to error.
It does not signal error.
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