| 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
Condition0%0/3
$sub and $params{"region"}
MC/DC0%0/2
$sub and $params{"region"}
$sub
$params{"region"}
Truth table0%0/3
A and B
A= $subB= $params{"region"}
| |||||||||||||||||||||||||||||||||
| 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
Condition0%0/3
$sub and $params{"region"}
MC/DC0%0/2
$sub and $params{"region"}
$sub
$params{"region"}
Truth table0%0/3
A and B
A= $subB= $params{"region"}
| |||||||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||||||