blib/lib/BioX/Workflow/Command/run/Rules/Directives/Interpolate/Mustache.pm

filter: Statementstmt 45.4% 10 / 22 Branchbran 0.0% 0 / 4 Conditioncond 0.0% 0 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 75.0% 3 / 4 Podpod 0.0% 0 / 1 totaltotal 36.1% 13 / 36 CC 4 SCAR 24.7
CC
4
Cov
34%
interpol_directive
20.0
BEGIN
1.0
BEGIN
1.0
CRAP 11.9
« blib/lib/BioX/Workflow/Command/stats.pm ↑ Summary blib/lib/BioX/Workflow/Command/inspect/Utils/ParsePlainText.pm »
1 package BioX::Workflow::Command::run::Rules::Directives::Interpolate::Mustache;
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 1 ▶use Template::Mustache;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub interpol_directive {
9 0 ▶ my $self = shift;
Subroutine interpol_directive: not called CC=4 SCAR=30.0
Pod undocumented
10 0 my $k = shift;
11 0 my $source = shift;
12 0 my $text = '';
13  
14 #The $ is not always at the beginning
15 0 ▶ if ( exists $self->interpol_directive_cache->{$source} && $source !~ m/{/ )
Branch: 1 branch
BranchTrueFalseTotal
if (exists $self->interpol_directive_cache->{$source} and not $source =~ /{/) 0 0 0
Condition0%0/3
exists $self->interpol_directive_cache->{$source} and not $source =~ /{/
!ll&&!rl&&r
000
MC/DC0%0/2
exists $self->interpol_directive_cache->{$source} and not $source =~ /{/
exists $self->interpol_directive_cache->{$source} not $source =~ /{/
Truth table0%0/3
A and not(B)
A= exists $self->interpol_directive_cache->{$source}B= not $source =~ /{/
ABresult
0X0
100
111
16 {
17 0 return $self->interpol_directive_cache->{$source};
18 }
19  
20 0 ▶ if ( $source !~ m/{/ ) {
Branch: 1 branch
BranchTrueFalseTotal
unless ($source =~ /{/) 0 0 0
21 0 $self->interpol_directive_cache->{$source} = $source;
22 0 return $source;
23 }
24  
25 0 $text = Template::Mustache->render( $source, $self );
26 0 $self->interpol_directive_cache->{$source} = $text;
27 0 return $text;
28  
29 }
30  
31 1 1;
« blib/lib/BioX/Workflow/Command/stats.pm ↑ Summary blib/lib/BioX/Workflow/Command/inspect/Utils/ParsePlainText.pm »