File Coverage

blib/lib/Interface/Validation/Directive.pm
Criterion Covered Total %
statement 7 9 77.7
branch n/a
condition n/a
subroutine 3 3 100.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             # Interface::Validation Directive Base Class
2             package Interface::Validation::Directive;
3              
4 1     1   58263 use Bubblegum;
  1         289450  
  1         6  
5 1     1   958939 use Function::Parameters;
  1         3178  
  1         8  
6 1     1   922 use Moose;
  0            
  0            
7              
8             use Bubblegum::Constraints -minimal;
9              
10             our $VERSION = '0.01_01'; # VERSION
11              
12             has 'args' => (
13             is => 'rw',
14             isa => 'Defined',
15             required => 1,
16             );
17              
18             has 'execution' => (
19             is => 'ro',
20             isa => 'Maybe[Interface::Validation::Execution]',
21             required => 0
22             );
23              
24             method args_list {
25             my $args = _defined $self->args;
26             return ($args->(@_)) if isa_coderef $args;
27             return ($args->list) if isa_arrayref $args;
28             return ($args);
29             }
30              
31             1;