Class::Workflow::State::TransitionHash - Implement transition metadata with a hash.
package MyState; use Moose; with qw/Class::Workflow::State::TransitionHash/;
This is a concrete role that implements transitions, has_transition and has_transitions as required by Class::Workflow::State, and adds add_transitions, remove_transitions, clear_transitions , get_transitions, and get_transition as well.
transitions
has_transition
has_transitions
add_transitions
remove_transitions
clear_transitions
get_transitions
get_transition
Transition storage is implemented internally with Set::Object.
This is an additional layer over Class::Workflow::State::TransitionSet that requires all transitions to respond to the name method, but as a bonus allows you to refer to your transitions by name or by value.
name
See Class::Workflow::State::TransitionSet and Class::Workflow::State.
These methods allow you to pass in either a name or an object, and always get back an object (unless the transition by that name does not exist, in which case you get an undefined value).
To install Class::Workflow, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Workflow
CPAN shell
perl -MCPAN -e shell install Class::Workflow
For more information on module installation, please visit the detailed CPAN module installation guide.