Devel::MAT::Tool::Future - analyse Future logic
This Devel::MAT tool performs analysis of objects and code logic built using the Future module.
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.
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.
@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 <firstname.lastname@example.org>
To install Devel::MAT::Tool::Future, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell
For more information on module installation, please visit the detailed CPAN module installation guide.