GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Class::Workflow::Transition::Deterministic(3) User Contributed Perl Documentation Class::Workflow::Transition::Deterministic(3)

Class::Workflow::Transition::Deterministic - A transition which knows which state it leads to.

        package MyTransition;
        use Moose;

        with qw/
                Class::Workflow::Transition
                Class::Workflow::Deterministic
        /;

        sub apply_body { # instead of 'sub apply'
                # body
        }

        # this may be changed to the following form in the future:
        augment apply => sub {
                # body
        };

This role provides a base role for transitions which know their target state.

It overrides "apply" with a default implementation that will derive an instance for you, setting "state" automatically, appending the return value from "apply_body" to that list.

You should consume this role unless you need to determine the target state dynamically (probably not a good idea).

to_state
The target state of the transition. Should do Class::Workflow::State.

apply
In scalar context returns the derived instance, in list caller also returns the remaining return value from "apply_body".

apply_body
The "inner" body of the function.

This method is always evaluated in list context, and is expected to return a hash reference of overridden fields as the first value in that list.

In the future instead of defining "apply_body" you will do:

        augment apply => sub {
                # body
        };
    

And this role's "apply" will really use "inner()".

2009-01-10 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.