File Coverage

blib/lib/Workflow/Action/Null.pm
Criterion Covered Total %
statement 13 13 100.0
branch n/a
condition n/a
subroutine 5 5 100.0
pod 1 1 100.0
total 19 19 100.0


line stmt bran cond sub pod time code
1             package Workflow::Action::Null;
2              
3 20     20   1253263 use warnings;
  20         51  
  20         1696  
4 20     20   136 use strict;
  20         44  
  20         643  
5 20     20   314 use v5.14.0;
  20         86  
6 20     20   120 use parent qw( Workflow::Action );
  20         37  
  20         142  
7              
8             $Workflow::Action::Null::VERSION = '2.09';
9              
10             sub execute {
11 27     27 1 1700 my ($self) = @_;
12 27         331 return;
13             }
14              
15             1;
16              
17             __END__
18              
19             =pod
20              
21             =head1 NAME
22              
23             Workflow::Action::Null - Workflow action for the terminally lazy
24              
25             =head1 VERSION
26              
27             This documentation describes version 2.09 of this package
28              
29             =head1 SYNOPSIS
30              
31             # in workflow.yaml...
32             state:
33             name: 'some state'
34             action:
35             - name: 'null'
36             ...
37              
38             # in workflow_action.yaml...
39             action:
40             - name: 'null'
41             class: Workflow::Action::Null
42              
43             =head1 DESCRIPTION
44              
45             Workflow action that does nothing. But unlike all those other lazy
46             modules out there, it does nothing with a purpose! For instance, you
47             might want some poor slobs to have some action verified but the elite
48             masters can skip the work entirely. So you can do:
49              
50             state:
51             - name: checking
52             autorun: yes
53             action:
54             - name: verify
55             resulting_state: verified
56             condition:
57             - name: isPoorSlob
58             - name: 'null'
59             resulting_state: verified
60             condition:
61             - name: isEliteMaster
62              
63             =head1 OBJECT METHODS
64              
65             =head3 execute()
66              
67             Implemented from L<Workflow::Action>. Proudly does nothing and proves
68             it by returning C<undef>.
69              
70             =head1 COPYRIGHT
71              
72             Copyright (c) 2003-2021 Chris Winters. All rights reserved.
73              
74             This library is free software; you can redistribute it and/or modify
75             it under the same terms as Perl itself.
76              
77             Please see the F<LICENSE>
78              
79             =head1 AUTHORS
80              
81             Please see L<Workflow>
82              
83             =cut