Devel::MAT::Tool::Future - analyse Future logic
Devel::MAT::Tool::Future
Future
This Devel::MAT tool performs analysis of objects and code logic built using the Future module.
Devel::MAT
This version supports analysing code based on Future version 0.24.
$ok = $tool->class_is_future( $pkg )
Returns true if the given package is a Future class. $pkg may be either a Devel::MAT::SV instance referring to a stash, or a plain string.
$pkg
Devel::MAT::SV
This tool adds the following SV methods.
$ok = $sv->is_future
Returns true if the Devel::MAT::SV instance represents a Future instance.
$state = $sv->future_state
Returns a string describing the state of the given Future instance; one of pending, done, failed or cancelled.
pending
done
failed
cancelled
@result = $sv->future_result
Returns a list of SVs containing the result of a successful Future.
@failure = $sv->future_failure
Returns a list of SVs containing the failure of a failed Future.
pmat> find future -f HASH(2)=Future at 0x55d43c854660: Future(failed) - SCALAR(PV) at 0x55d43c8546f0 = "It failed"
Lists SVs that are Future instances, optionally matching only futures in a given state.
Takes the following named options
Lists only Futures in the pending state
Lists only Futures in the done state
Lists only Futures in the failed state
Lists only Futures in the cancelled state
Paul Evans <leonerd@leonerd.org.uk>
To install Devel::MAT::Tool::Future, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Devel::MAT::Tool::Future
CPAN shell
perl -MCPAN -e shell install Devel::MAT::Tool::Future
For more information on module installation, please visit the detailed CPAN module installation guide.