Changes for version 0.33 - 2025-12-18

  • ENHANCEMENT
    • iterators have new predicates (throws_on_exhaustion, returns_on_exhaustion) to determine exhaustion handling
    • Iterator methods which begin with 'i' are available without the leading 'i'. The previous ones (e.g. imap, ichunk) are deprecated but still available. As these are methods on existing iterators, the leading 'i' is superfluous.
    • New iterator method, foreach
    • Added iterator methods which track the existing adapters: cat/chain, gather, take, buffer

Documentation

Index of Iterator::Flex Manuals
Interfacing with non- Iterator::Flex things.
How to write an iterator
An Abstract overview of Iterators
Other Iterator Models
How to use an Iterator::Flex iterator

Modules

Iterators with flexible behaviors
Array Iterator Class
ArrayLike Iterator Class
Iterator object
Buffer Iterator Class
Cache Iterator Class
An iterator which concatenates a set of iterators
Chunk Iterator Class
Iterator Generators and Adapters
Array Cycle Iterator Class
Create on-the-fly Iterator::Flex classes/objects
Failure classes for Iterator::Flex
Flatten Iterator Class
Freeze an iterator after every next
Gather Iterator Class
Constants for Gather
Grep Iterator Class
Map Iterator Class
Compartmentalize Iterator::Flex::Method::Maker
Permute Iterator Class
An iterator which produces a Cartesian product of iterators
Implement current as a closure stored in the registry
Implement current as a method
signal error by throwing
Imported iterator returns a sentinel
signal exhaustion by transitioning to exhausted state and throwing exception
signal exhaustion by returning a sentinel value.
signal exhaustion by setting exhausted flag and throwing;
Role to add serialization capability to an Iterator::Flex::Base
Role for closure iterator which closes over self
Construct a next() method for iterators without closed over $self
Implement prev as a closure stored in the registry
Implement prev as a method
Implement reset as a closure stored in the registry
Implement reset as a method
Implement rewind as a closure stored in the registry
Implement rewind as a method
abstract interface role for State
Iterator State is kept in a closure variable
Iterator State is kept in the registry
wrap imported iterator which returns a sentinel on exhaustion
Construct a next() method for a coderef which expects to be passed an object ref
Role to add throw on exhaustion to an iterator which adapts another iterator
Numeric Sequence Iterator Class
An iterator which concatenates a set of iterators
Take Iterator Class
Internal utilities
Zip Iterator Class

Provides

in lib/Iterator/Flex/Method.pm