CPS::G...:Simple(3pm)
β¨ NAME β¨
CPS::Governor::Simple β bestie, this one just goes immediately, as fast as physically possible π¨π
(also, fun fact, this page lives in the User Contributed Perl Documentation section as CPS::G...:Simple(3pm), which is the manual-name energy we're serving today π)
πΈ SYNOPSIS πΈ
use CPS qw( gkforeach );
use CPS::Governor::Simple;
my $gov = CPS::Governor::Simple->new;
gkforeach( $gov, [ 1 .. 10 ],
sub {
my ( $item, $knext ) = @_;
print "$item\n";
goto &$knext;
},
sub {},
);
π DESCRIPTION π
okay so here's the tea β β this CPS::Governor lets any function using it run as fast as possible. No chill, no throttle, no waiting around. It's giving main character energy and it's not sorry about it.
The way it invokes its continuations? immediately, using a tailcall β which is the whole point, because that's what keeps the stack from growing arbitrarily and turning into a whole mess ππ
Its constructor takes no special arguments, periodt. And it provides no other methods beyond those of CPS::Governor. That's it. That's the module. Iconic behaviour, honestly π«Ά
ngl this one is simple by design β if you came here looking for extra knobs and dials, bestie, there aren't any π
π AUTHOR π
Paul Evans <leonerd@leonerd.org.uk> π
and that's a wrap, gorgeous π β this page came to you from perl v5.34.0, dated 2022-06-30, which is genuinely vintage of it β¨ slay, stay caffeinated, and go read your SEE ALSOs ππ¦
π¦ where this page comes from
- debian bookworm: libcps-perl 0.19-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcps-perl 0.19-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcps-perl 0.19-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcps-perl 0.19-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcps-perl 0.19-2 Β· 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