Coro::Cont - continuations in perl
use Coro::Cont; # multiply all hash keys by 2 my $cont = csub { yield $_*2; yield $_; }; my %hash2 = map &$csub, &hash1; # dasselbe in grün (as we germans say) sub mul2 : Cont { yield $_[0]*2; yield $_[0]; } my %hash2 = map mul2($_), &hash1;
Create a new "continuation" (when the sub falls of the end it is being terminated).
Return the given list/scalar as result of the continuation. Also returns the new arguments given to the subroutine on the next call.
Marc Lehmann <pcg@goof.com> http://home.schmorp.de/
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'grün'. Assuming UTF-8
To install Coro, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Coro
CPAN shell
perl -MCPAN -e shell install Coro
For more information on module installation, please visit the detailed CPAN module installation guide.