line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Workflow::Command::run::Rules::Directives::Interpolate; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
74042
|
use Moose::Role; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
15
|
|
4
|
1
|
|
|
1
|
|
6827
|
use namespace::autoclean; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
13
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
128
|
use Moose::Util qw/apply_all_roles/; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
16
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
264
|
use Try::Tiny; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
278
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
has 'interpol_directive_cache' => ( |
11
|
|
|
|
|
|
|
is => 'rw', |
12
|
|
|
|
|
|
|
isa => 'HashRef', |
13
|
|
|
|
|
|
|
default => sub { {} }, |
14
|
|
|
|
|
|
|
); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'errors' => ( |
17
|
|
|
|
|
|
|
is => 'rw', |
18
|
|
|
|
|
|
|
isa => 'Bool', |
19
|
|
|
|
|
|
|
default => 0, |
20
|
|
|
|
|
|
|
); |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
#TODO This should not be here |
23
|
|
|
|
|
|
|
has 'before_meta' => ( |
24
|
|
|
|
|
|
|
traits => ['String'], |
25
|
|
|
|
|
|
|
is => 'rw', |
26
|
|
|
|
|
|
|
isa => 'Str', |
27
|
|
|
|
|
|
|
default => q{}, |
28
|
|
|
|
|
|
|
predicate => 'has_before_meta', |
29
|
|
|
|
|
|
|
required => 0, |
30
|
|
|
|
|
|
|
handles => { |
31
|
|
|
|
|
|
|
add_before_meta => 'append', |
32
|
|
|
|
|
|
|
replace_before_meta => 'replace', |
33
|
|
|
|
|
|
|
}, |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
after 'BUILD' => sub { |
37
|
|
|
|
|
|
|
my $self = shift; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
return if $self->can('interpol_directive'); |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
my $role = 'BioX::Workflow::Command::run::Rules::Directives::Interpolate::'.$self->template_type; |
42
|
|
|
|
|
|
|
try { |
43
|
|
|
|
|
|
|
apply_all_roles( $self, $role ); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
catch { |
46
|
|
|
|
|
|
|
$self->app_log->warn( 'There was an error registering Template role ' . $role ); |
47
|
|
|
|
|
|
|
$self->app_log->warn( $@ . "\n" ); |
48
|
|
|
|
|
|
|
}; |
49
|
|
|
|
|
|
|
}; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
1; |