CPS::Governor::Simple(3pm)

CPS::Governor::Simple3pm

Iterate immediately as fast as possible

Usage

 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 {},
 );

Overview

This CPS::Governor allows the functions using it to run as fast as possible. It invokes its continuations immediately using a tailcall, so as not to let the stack grow arbitrarily.

Its constructor takes no special arguments, and it provides no other methods beyond those of "CPS::Governor".

Releases

7 releases since Debian 7 (Wheezy); the text changed 4 times.

  1. 7
  2. 8
  3. 9–10
  4. 11
  5. 12–13

Author

Paul Evans <[email protected]>

From libcps-perl 0.19-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.