lib/BioX/Workflow/Command/run/Rules/Directives/Types/Array.pm

filter: Statementstmt 43.4% 10 / 23 Branchbran n/a Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 2 totaltotal 38.2% 13 / 34 CC 2 SCAR 10.0
CC
2
Cov
40%
transform_aoh
6.0
create_ARRAY_attr
2.0
__ANON__
2.0
CRAP 2.7
« lib/BioX/Workflow/Command/validate.pm ↑ Summary lib/BioX/Workflow/Command/run/Rules/Directives/Types/Glob.pm »
1 package BioX::Workflow::Command::run::Rules::Directives::Types::Array;
2  
3 1 ▶use Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use namespace::autoclean;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub create_ARRAY_attr {
Subroutine create_ARRAY_attr: not called CC=1 SCAR=6.9
Pod undocumented
7 0 my $self = shift;
8 0 my $meta = shift;
9 0 my $k = shift;
10  
11 $meta->add_attribute(
12 $k => (
13 # traits => ['Array'],
14 isa => 'ArrayRef',
15 is => 'rw',
16 clearer => "clear_$k",
17 0 ▶ default => sub { [] },
Subroutine __ANON__: not called CC=1 SCAR=6.9
18 # handles => {
19 # "all_$k" . "s" => 'elements',
20 # "count_$k" => 'count',
21 # "has_$k" => 'count',
22 # "has_no_$k" => 'is_empty',
23 # },
24 )
25 0 );
26 }
27  
28 0 ▶sub transform_aoh {
Subroutine transform_aoh: not called CC=2 SCAR=17.9
Pod undocumented
29 0 my $self = shift;
30 0 my $k = shift;
31 0 my $v = shift;
32 0 ▶ my $lookup = shift || 'k';
Condition0%0/2
shift() || 'k'
l!l
00
MC/DC0%0/1
shift() || 'k'
shift()
Truth table0%0/2
A
A= shift()
Aresult
11
00
33  
34 0 my @data = map { {$lookup => $_} } @{$v};
35  
36 0 $self->$k(\@data);
37  
38 }
39  
40 # no Moose;
41 1 ▶no Moose::Role;
Subroutine BEGIN: called CC=1 SCAR=0.0
42  
43 1 1;
« lib/BioX/Workflow/Command/validate.pm ↑ Summary lib/BioX/Workflow/Command/run/Rules/Directives/Types/Glob.pm »