blib/lib/Date/Holidays/Adapter/NZ.pm

filter: Statementstmt 46.6% 14 / 30 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 6 MC/DCmcdc 0.0% 0 / 4 Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 35.7% 20 / 56 CC 7 SCAR 26.1
CC
7
Cov
32%
holidays
20.0
is_holiday
20.0
BEGIN
1.0
CRAP 13.7
« blib/lib/Date/Holidays/Adapter/ES.pm ↑ Summary blib/lib/Date/Holidays/Adapter/JP.pm »
1 package Date::Holidays::Adapter::NZ;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use vars qw($VERSION);
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use base 'Date::Holidays::Adapter';
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 $VERSION = '1.35';
10  
11 0 ▶sub holidays {
Subroutine holidays: not called CC=4 SCAR=30.0
Pod documented
12 0 my ($self, %params) = @_;
13  
14 0 my $sub = $self->{_adaptee}->can('nz_holidays');
15  
16 0 ▶ if ($sub and $params{region}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($sub and $params{'region'}) { } 0 0 0
elsif ($sub) { } 0 0 0
Condition0%0/3
$sub and $params{"region"}
!ll&&!rl&&r
000
MC/DC0%0/2
$sub and $params{"region"}
$sub $params{"region"}
Truth table0%0/3
A and B
A= $subB= $params{"region"}
ABresult
0X0
100
111
17 0 return &{$sub}($params{'year'}, $params{region});
18 } elsif ($sub) {
19 0 return &{$sub}($params{'year'});
20 } else {
21 0 return;
22 }
23 }
24  
25 0 ▶sub is_holiday {
Subroutine is_holiday: not called CC=4 SCAR=30.0
Pod documented
26 0 my ($self, %params) = @_;
27  
28 0 my $sub = $self->{_adaptee}->can('is_nz_holiday');
29  
30 0 ▶ if ($sub and $params{region}) {
Branch: 2 branches
BranchTrueFalseTotal
if ($sub and $params{'region'}) { } 0 0 0
elsif ($sub) { } 0 0 0
Condition0%0/3
$sub and $params{"region"}
!ll&&!rl&&r
000
MC/DC0%0/2
$sub and $params{"region"}
$sub $params{"region"}
Truth table0%0/3
A and B
A= $subB= $params{"region"}
ABresult
0X0
100
111
31 0 return &{$sub}($params{'year'}, $params{'month'}, $params{'day'}, $params{region});
32 } elsif ($sub) {
33 0 return &{$sub}($params{'year'}, $params{'month'}, $params{'day'});
34 } else {
35 0 return;
36 }
37 }
38  
39 1 1;
40  
41 __END__
« blib/lib/Date/Holidays/Adapter/ES.pm ↑ Summary blib/lib/Date/Holidays/Adapter/JP.pm »