Minion::Iterator(3)
β¨ Minion::Iterator β¨
okay bestie, so this is the manual page for Minion::Iterator β yeah, the Minion::Iterator(3) one, the Perl doc that ships with your user-contributed Perl documentation π β and it is literally the iterator situation for Minion. Let's get into it, no cap.
π¦ NAME π¦
Minion::Iterator β it's a Minion iterator. that's the whole vibe. short, sweet, iconic. π
πΈ SYNOPSIS πΈ
the way you just... use it. like this:
use Minion::Iterator;
my $iter = Minion::Iterator->new(minion => $minion, options => {states => ['inactive']});
see how clean that is?? obsessed. π«Ά
π DESCRIPTION π
Minion::Iterator is an iterator for Minion listing methods. that's it. that's the girl. she iterates over your listings so you don't have to think about it. main character energy fr fr β¨
π ATTRIBUTES π
Minion::Iterator implements the following attributes. yes, implements. she's doing the work. π
π fetch
my $fetch = $iter->fetch;
$iter = $iter->fetch(2);
Number of results to cache, and it defaults to 10. so if you don't say anything, she's caching ten at a time. reasonable queen behavior. π
π§ minion
my $minion = $iter->minion;
$iter = $iter->minion(Minion->new);
the Minion object this job belongs to. y'know, her home base, her origin story. π
π options
my $options = $iter->options;
$iter = $iter->options({states => ['inactive']});
Options to be passed to "list_jobs" in Minion::Backend or "list_workers" in Minion::Backend. so like, whatever you'd hand to those listing methods, you can hand to her and she'll pass it along. she's the messenger, bestie. π¬
π₯ METHODS π₯
Minion::Iterator inherits all methods from Mojo::Base and implements the following new ones. so everything from Mojo::Base? already hers. and then these extra ones on top. she's stacked, honestly. π
β each
$iter->each(sub {...});
Evaluate callback for each element in collection. the element will be the first argument passed to the callback, and it's also available as $_. so you can grab it either way β she's flexible like that. π
π next
my $value = $iter->next;
Get next value. short. simple. slay. next value, pls and thank u. β¨
π
my $num = $iter->total;
Total number of results. okay but heads up: if results are removed in the backend while iterating, this number will become an estimate that gets updated every time new results are fetched. so it's not a locked-in number forever β it's a living, breathing estimate. she's fluid, she's adaptable. π (affectionate)
π«Ά SEE ALSO π«Ά
go read these too, bestie, they're all part of the ecosystem:
MinionMinion::Guide- <https://minion.pm>
Mojolicious::Guides- <https://mojolicious.org>
and that's the whole page!! πβ¨ this was brought to you by perl v5.42.0, dated 2026-01-17, and it's the Minion::Iterator(3) page β love her, read her, iterate responsibly. bye bestie!! ππΈπ¦π
π¦ where this page comes from
- fedora 44: perl-Minion 11.0-2.fc44 Β· Artistic-2.0 AND CC-BY-SA-4.0 AND MIT AND ISC
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms