Class::Workflow::State::AcceptHooks - Add hooks that are fired when the state accepts an instance.
use Class::Workflow::State::AcceptHooks;
When an instance enters a state it is sometimes convenient to call hooks, for e.g. notification or logging purposes.
These hooks should not have any side effect that directly affects the workflow instance in any way - for that functionality you should use transitions.
Hooks' returns values are thus ignored.
Add hooks. These should be sub references.
Clear the list of hooks.
Get the list of registered hooks.
This method has an after hook that calls the hooks in the order of their definition.
after
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.