Excel/Template/Plus.pm

filter: Statementstmt 79.1% 19 / 24 Branchbran 25.0% 1 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod 100% 1 / 1 totaltotal 75.7% 25 / 33 CC 3 SCAR 9.4
CC
3
Cov
71%
new
4.1
BEGIN
1.0
BEGIN
1.0
CRAP 2.6
« Test/Excel/Template/Plus.pm ↑ Summary Excel/Template/Plus/TT.pm »
1  
2 package Excel::Template::Plus;
3 3 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use Module::Runtime ();
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 3 our $VERSION = '0.06';
7 3 our $AUTHORITY = 'cpan:STEVAN';
8  
9 1 ▶sub new {
Subroutine new: called CC=3 SCAR=14.2
Pod documented
10 1 shift;
11 1 my %options = @_;
12
13 1 my $engine_class = 'Excel::Template::Plus::' . $options{engine};
14  
15 1 eval { Module::Runtime::use_module($engine_class) };
16 1 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 1 0 1
17 1 confess "Could not load engine class ($engine_class) because " . $@;
18 }
19
20 0 my $template = eval { $engine_class->new(%options) };
21 0 ▶ if ($@) {
Branch: 1 branch
BranchTrueFalseTotal
if ($@) 0 0 0
22 0 confess "Could not create template from engine class ($engine_class) because " . $@;
23 }
24
25 0 return $template;
26 }
27  
28 3 ▶no Moose; 1;
Subroutine BEGIN: called CC=1 SCAR=0.0
29  
30 __END__
« Test/Excel/Template/Plus.pm ↑ Summary Excel/Template/Plus/TT.pm »