Tools/Output/TT.pm

filter: Statementstmt 94.1% 16 / 17 Branchbran 50.0% 1 / 2 Conditioncond 100% 2 / 2 MC/DCmcdc 100% 1 / 1 Subroutinesub 83.3% 5 / 6 Podpod 0.0% 0 / 1 totaltotal 86.2% 25 / 29 CC 3 SCAR 6.3
CC
3
Cov
90%
process
3.0
__ANON__
2.0
BEGIN
1.0
CRAP 1.9
« Tools/YAMLCache.pm ↑ Summary Tools/ArchiveLink/Easy.pm »
1 #!/usr/bin/perl
2  
3 package Mail::Summary::Tools::Output::TT;
4 1 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Template;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 has template_config => (
9 isa => "HashRef",
10 is => "rw",
11 3 ▶ default => sub { return {} },
Subroutine __ANON__: called CC=1 SCAR=0.0
12 1 );
13  
14 has template_obj => (
15 isa => "Template",
16 is => "rw",
17 lazy => 1,
18 3 ▶ default => sub { Template->new( $_[0]->template_config ) },
Subroutine __ANON__: called CC=1 SCAR=0.0
19 1 );
20  
21 has template_output => (
22 isa => "Any",
23 is => "rw",
24 0 ▶ default => sub { \*STDOUT },
Subroutine __ANON__: not called CC=1 SCAR=6.9
25 1 );
26  
27 1 has template_input => (
28 isa => "Any",
29 is => "rw",
30 required => 1,
31 );
32  
33 3 ▶sub process {
Subroutine process: called CC=3 SCAR=11.1
Pod undocumented
34 3 my ( $self, $summary, $vars, @args ) = @_;
35  
36 $self->template_obj->process(
37 $self->template_input,
38 {
39 summary => $summary,
40 processor => $self,
41 3 ▶ %{ $vars || {} },
Branch: 1 branch
BranchTrueFalseTotal
$self->template_obj->process($self->template_input, {"summary", $summary, "processor", $self, %{$vars or {};}}, $self->template_output) or die $self->template_obj->error 3 0 3
Condition100%2/2
$vars || {}
l!l
12
MC/DC100%1/1
$vars || {}
$vars
Truth table100%2/2
A
A= $vars
Aresult
11
00
42 },
43 $self->template_output,
44 ) || die $self->template_obj->error;
45 }
46  
47 1 __PACKAGE__;
48  
49 __END__
« Tools/YAMLCache.pm ↑ Summary Tools/ArchiveLink/Easy.pm »