Branch Coverage

blib/lib/Date/Holidays/NZ.pm
Criterion Covered Total %
branch 53 66 80.3


line true false branch
8 1 0 if ($@) { }
10 0 1 if $Set::Object::VERSION < 1.09
144 36 0 unless ($rev_regions{'Auckland'})
153 0 10 unless defined $region
154 6 4 if (&looks_like_number($region)) { }
164 0 34 unless defined $region
165 5 29 if (&looks_like_number($region)) { }
166 1 4 unless exists $regions{$region}
176 0 93 unless my $label = shift()
178 65 28 if (not &looks_like_number($label) and exists $HOLIDAYS{$label . " $AD"})
184 27 1 if ($followed = $FOLLOW{$region}) { }
185 3 24 if (&looks_like_number($followed))
192 12 16 unless ($followed =~ /Day$/)
202 12 40 if ($falls_on >= 6)
227 67 141 if ($value =~ /^(\d\d)(\d\d)\+?$/) { }
66 75 elsif ($value =~ /^(\d+(?:st|nd|rd|th) \w+day in \w+)(.*)$/i) { }
49 26 elsif ($value =~ /^Closest (\w+day) to (\d\d)(\d\d)(.*)$/i) { }
26 0 elsif ($value =~ /^Easter(.*)$/i) { }
242 43 6 if (my $diff = ($wanted - $got + 7) % 7) { }
244 20 23 if ($diff < 4) { }
260 46 95 if $add
269 7 4 if ($year < 2014)
277 0 110 unless my $when = interpret_date($year, $holidays{$holiday} || die())
280 52 58 if ($when =~ s/\+//)
306 0 85 if ($region)
325 0 168 if (exists $hols->{$mmdd})
329 84 84 if ($region)
336 84 0 if ($when eq $mmdd)
346 1 5 if $holiday_aliases{$holname}
347 0 6 unless exists $HOLIDAYS{$holname}
349 3 3 if ($NATIONAL_HOLIDAYS->has($holname)) { }
353 1 2 if ($date =~ s/\+$//)
357 0 2 if $date eq '1231'