-
-
28 Aug 2009 15:03:01 UTC
- Distribution: Class-Workflow
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (0)
- Testers (643 / 14 / 1)
- Kwalitee
Bus factor: 3- % Coverage
- License: unknown
- Activity
24 month- Tools
- Download (31.08KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Data::Compare
- Moose
- MooseX::Clone
- Set::Object
- Test::More
- Test::use::ok
- YAML::Syck
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Class::Workflow::Transition - A function over an instance.
SYNOPSIS
package MyTransition; use Moose; with 'Class::Workflow::Transition';
DESCRIPTION
This is the base role for transition implementations.
every transition object must comply to it's interface, and furthermore must also use the
derive_and_accept_instance
method to return a derived instance at the end of the operation.METHODS
- derive_and_accept_instance $instance, \%attrs, @args
-
This method calls
$instance->derive
with the attrs, and then calls the instanceaccept_instance
on the new instance's state.%attrs
must contain the keystate
, which should do the role Class::Workflow::State.@args are passed (along with the derived instance) to "accept_instance" in Class::Workflow::State.
REQUIRED METHODS
- apply $insatnce, @args
-
This method accepts a Class::Workflow::Instance as it's first argument, and is expected to call
$self->derive_and_accept_instance( $instance, \%attrs, @args )
, with%attrs
containing the state that the instance is being transferred to (it doesn't have to be different than the current state).
Module Install Instructions
To install Class::Workflow, copy and paste the appropriate command in to your terminal.
cpanm Class::Workflow
perl -MCPAN -e shell install Class::Workflow
For more information on module installation, please visit the detailed CPAN module installation guide.