line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package BioX::Workflow::Command::run::Rules::Directives::Interpolate::Mustache; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5171
|
use Moose::Role; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
10
|
|
4
|
1
|
|
|
1
|
|
8066
|
use namespace::autoclean; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
12
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
100
|
use Template::Mustache; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
258
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub interpol_directive { |
9
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
10
|
0
|
|
|
|
|
|
my $source = shift; |
11
|
0
|
|
|
|
|
|
my $text = ''; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
#The $ is not always at the beginning |
14
|
0
|
0
|
0
|
|
|
|
if ( exists $self->interpol_directive_cache->{$source} && $source !~ m/{/ ) |
15
|
|
|
|
|
|
|
{ |
16
|
0
|
|
|
|
|
|
return $self->interpol_directive_cache->{$source}; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
0
|
0
|
|
|
|
|
if ( $source !~ m/{/ ) { |
20
|
0
|
|
|
|
|
|
$self->interpol_directive_cache->{$source} = $source; |
21
|
0
|
|
|
|
|
|
return $source; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
$text = Template::Mustache->render( $source, $self ); |
25
|
0
|
|
|
|
|
|
$self->interpol_directive_cache->{$source} = $text; |
26
|
0
|
|
|
|
|
|
return $text; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |