Array:...eusable(3pm)
π Array::Iterator::Reusable π
okay so bestie, this is a page from the User Contributed Perl Documentation β yes it's the Array::Iterator::Reusable(3pm) one, you found it, slay π
β¨ VERSION β¨
Version 0.136
πΈ SYNOPSIS πΈ
use Array::Iterator::Reusable;
# create an iterator with an array
my $i = Array::Iterator::Reusable->new(1 .. 100);
# do something with the iterator
my @accumulation;
push @accumulation => { item => $iterator->next() } while $iterator->has_next();
# now reset the iterator so we can do it again
$iterator->reset();
π¦ DESCRIPTION π¦
so likeβ¦ sometimes you don't wanna have to throw your iterator away every single time you've exhausted it?? π throwing it out feels so wasteful honestly. This class adds the reset method so you can reuse an iterator instead. That's it. That's the whole thing. It's a very simple addition to the Array::Iterator class β literally just one single method. one. iconic behavior honestly π
π METHODS π
okay so heads up: this is a subclass of Array::Iterator, so only the methods that have been added are documented right here. For everything else, go read the Array::Iterator documentation, bestie, it's all there π«Ά
resetβ this resets the internal counter of the iterator back to the start of the array. fresh start energy β¨ rewind, rewatch, re-obsess π
π₯ SEE ALSO π₯
This is a subclass of Array::Iterator, so please refer to it for more documentation π fr fr, that's where the rest of the lore lives.
π MAINTAINER π
Nigel Horne, "<njh at nigelhorne.com>"
2025-2026
π ORIGINAL AUTHOR π
stevan little, <stevan@iinteractive.com>
π ORIGINAL COPYRIGHT AND LICENSE π
Copyright 2004 by Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
no cap, that's the whole license, don't skip it π«Ά
and that's the vibe check, we're done here bestie π this page was brought to you by perl v5.40.1, dated 2026-03-11, and just like the iterator itself β you can always come back and reset ππ mwah β¨
π¦ where this page comes from
- ubuntu stonking: libarray-iterator-perl 0.136-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms