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


Manual Reference Pages  -  CLASS::WORKFLOW::TRANSITION::VALIDATE::SIMPLE (3)

.ds Aq ’

NAME

Class::Workflow::Transition::Validate::Simple - Easier validation code.

CONTENTS

SYNOPSIS



        package MyTransition;
        use Moose;

        with qw/Class::Workflow::Transition::Validate::Simple/;

        # ...

        $t->clear_validators;
        $t->add_validators( sub { ... } );



DESCRIPTION

FIELDS

ignore_validator_rv This is useful if your validators only throw exceptions.

Defaults to false

error_state This contains a state that will be moved to if a validation error occurs.

In conjunction with Class::Workflow::State::AutoApply this can work like a catch block.

The instance will have the error attribute set.

no_die If this is set, validation_error will not die even if error_state is not set.

The instance will have the error attribute set, and will be reaccepted into it’s current state, with the error.

METHODS

validators This is an optional list of sub refs which will be called to validate input before applying body.

They should raise an exception or return a false value if the input is bad.

They may put validation result information inside the Class::Workflow::Context or equivalent, if one is used.

A more comprehensive solution is to override the validate method yourself and provide rich exception objects with validation error descriptors inside them.

The validators are invoked as methods on the transition.

IF ignore_validator_rv is true then only exceptions are considered input validations.

add_validators @code_refs
clear_validators Modify the list of validators.

ROLES

This role consumes the following roles:
o Class::Workflow::Transition::Validate
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 CLASS::WORKFLOW::TRANSITION::VALIDATE::SIMPLE (3) 2009-01-10

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