CPS::Future - compatibility wrapper around Future
CPS::Future
This module provides a compatibility wrapper around Future. The code it used to contain was renamed to move it out of the CPS distribution. Existing code that refers to CPS::Future should be changed to use Future instead.
CPS
Future
This subclass overloads the calling operator, so simply invoking the future object itself as if it were a CODE reference is equivalent to calling the done method. This makes it simple to pass as a callback function to other code.
CODE
done
It turns out however, that this behaviour is too subtle and can lead to bugs when futures are accidentally used as plain CODE references. See the done_cb method instead. This overload behaviour will be removed in a later version.
done_cb
To install CPS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CPS
CPAN shell
perl -MCPAN -e shell install CPS
For more information on module installation, please visit the detailed CPAN module installation guide.