File Coverage

blib/lib/BioX/Workflow/Command/run/Rules/Directives/Types/Array.pm
Criterion Covered Total %
statement 3 8 37.5
branch n/a
condition n/a
subroutine 1 3 33.3
pod 0 1 0.0
total 4 12 33.3


line stmt bran cond sub pod time code
1             package BioX::Workflow::Command::run::Rules::Directives::Types::Array;
2              
3 1     1   2263 use Moose::Role;
  1         4  
  1         11  
4              
5             sub create_ARRAY_attr {
6 0     0 0   my $self = shift;
7 0           my $meta = shift;
8 0           my $k = shift;
9              
10             $meta->add_attribute(
11             $k => (
12             traits => ['Array'],
13             isa => 'ArrayRef',
14             is => 'rw',
15             clearer => "clear_$k",
16 0     0     default => sub { [] },
17 0           handles => {
18             "all_$k" . "s" => 'elements',
19             "count_$k" => 'count',
20             "has_$k" => 'count',
21             "has_no_$k" => 'is_empty',
22             },
23             )
24             );
25             }
26              
27             1;