line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Workflow::Command::run::Rules::Directives::Types::Array; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1498
|
use Moose::Role; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
4
|
1
|
|
|
1
|
|
4688
|
use namespace::autoclean; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub create_ARRAY_attr { |
7
|
0
|
|
|
0
|
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
|
|
|
0
|
|
|
default => sub { [] }, |
18
|
0
|
|
|
|
|
|
handles => { |
19
|
|
|
|
|
|
|
"all_$k" . "s" => 'elements', |
20
|
|
|
|
|
|
|
"count_$k" => 'count', |
21
|
|
|
|
|
|
|
"has_$k" => 'count', |
22
|
|
|
|
|
|
|
"has_no_$k" => 'is_empty', |
23
|
|
|
|
|
|
|
}, |
24
|
|
|
|
|
|
|
) |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub transform_aoh { |
29
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
30
|
0
|
|
|
|
|
|
my $k = shift; |
31
|
0
|
|
|
|
|
|
my $v = shift; |
32
|
0
|
|
0
|
|
|
|
my $lookup = shift || 'k'; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my @data = map { {$lookup => $_} } @{$v}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
$self->$k(\@data); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
1; |