The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Iterator::Flex::Freeze - Freeze an iterator after every next

VERSION

version 0.18

METHODS

construct

  $iter = Iterator::Flex::Freeze->new( $coderef, $iterator, ?\%pars );

Construct a pass-through iterator which freezes the input iterator after every call to next. $coderef will be passed the frozen state (generated by calling $iterator-freeze> via $_, with which it can do as it pleases.

<$coderef> is executed when $iterator is exhausted.

The optional %pars hash may contain standard signal parameters.

The returned iterator supports the following methods:

next
prev

If $iterator provides a prev method.

rewind
freeze

INTERNALS

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