File Coverage

blib/lib/Class/Workflow/Instance/Simple.pm
Criterion Covered Total %
statement 1 3 33.3
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 2 4 50.0


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2              
3             package Class::Workflow::Instance::Simple;
4 1     1   2116 use Moose;
  0            
  0            
5              
6             with "Class::Workflow::Instance";
7              
8             has error => (
9             isa => "Undef|Str|Object",
10             is => "ro",
11             );
12              
13             __PACKAGE__;
14              
15             __END__
16              
17             =pod
18              
19             =head1 NAME
20              
21             Class::Workflow::Instance::Simple - A Workflow instance objects to work with
22             the other ::Simple classes.
23              
24             =head1 SYNOPSIS
25              
26             use Class::Workflow::Instance::Simple;
27              
28             my $i = Class::Workflow::Instance::Simple->new;
29              
30             my $new_i = $transition->apply( $i );
31              
32             =head1 DESCRIPTION
33              
34             This method adds an error field to L<Class::Workflow::Instance>.
35              
36             In the event that you want to make errors non-fatal, but instead encapsulate
37             errors in the workflow using their own states, C<error> just becomes a regular
38             field. L<Class::Workflow::Transition::Validate::Simple> provides a simple means
39             to add validation, with the optional notion of an C<error_state> for
40             transitions.
41              
42             =head1 FIELDS
43              
44             =over 4
45              
46             =item error
47              
48             Does what it says.
49              
50             See L<Class::Workflow::Transition::Validate::Simple>.
51              
52             =back
53              
54             =cut
55              
56