lib/BalanceOfPower/Printer.pm

filter: Statementstmt 33.3% 8 / 24 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 0.0% 0 / 1 totaltotal 31.2% 10 / 32 CC 3 SCAR 20.3
CC
3
Cov
29%
print
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 7.6
« blib/lib/BalanceOfPower/Commands/RebelMilitarySupport.pm ↑ Summary lib/BalanceOfPower/Commands/LowerDisorder.pm »
1 package BalanceOfPower::Printer;
2 11 $BalanceOfPower::Printer::VERSION = '0.300010';
3 11 ▶use Template;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 11 ▶use Cwd 'abs_path';
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 sub print
7 {
8 0 ▶ my $mode = shift;
Subroutine print: not called CC=3 SCAR=24.8
Pod undocumented
9 0 my $world = shift;
10 0 my $template = shift;
11 0 my $vars = shift;
12  
13 0 my $module_file_path = __FILE__;
14 0 my $root_path = abs_path($module_file_path);
15 0 $root_path =~ s/Printer\.pm//;
16 0 $root_path .= "templates";
17  
18 0 my $tt = Template->new({INCLUDE_PATH => "$root_path/$mode",
19 PLUGIN_BASE => 'Template::Plugin::Filter'});
20  
21 0 ▶ if(ref $world eq 'BalanceOfPower::World')
Branch: 1 branch
BranchTrueFalseTotal
if (ref $world eq "BalanceOfPower::World") 0 0 0
22 {
23 0 my %nation_codes = reverse %{$world->nation_codes};
24 0 $vars->{'nation_codes'} = \%nation_codes;
25 }
26 0 my $output;
27 0 ▶ $tt->process("$template.tt", $vars, \$output) || die $tt->error . "\n";
Branch: 1 branch
BranchTrueFalseTotal
$tt->process("$template.tt", $vars, \$output) or die $tt->error . "\n" 0 0 0
28 0 return $output;
29 }
30  
31 11 1;
32  
« blib/lib/BalanceOfPower/Commands/RebelMilitarySupport.pm ↑ Summary lib/BalanceOfPower/Commands/LowerDisorder.pm »