Branch Coverage

blib/lib/Date/Tolkien/Shire/Data.pm
Criterion Covered Total %
branch 121 156 77.5


line true false branch
81 21 0 $hour < 12 ? :
94 35 376 unless $month
110 721 13 $month ? :
113 368 366 unless (__is_leap_year($year))
114 0 368 if not $month and 4 == $day
117 182 186 if $yd >= 184
128 365 366 unless (__is_leap_year($year))
129 182 183 if $yd >= 184
132 0 731 unless $yd > 0 and $yd <= 366
137 11 4347 if $yd == $holiday_day[$day]
142 360 360 if $yd > 180
167 3 0 $date->can($1) ? :
24 331 $2 ? :
3 355 $1 ? :
180 18 30 unless defined $cond[$inx] and '' ne $cond[$inx]
186 14 10 if defined $cond[1] and not $date->__fmt_shire_month
189 3 21 if defined $cond[2] and not __day_of_week($date->__fmt_shire_month, $date->__fmt_shire_day)
354 0 331 unless defined $mod
357 4 327 if $wid
360 26 0 if $code = $modifier_map{$char}
363 4 327 if ($wid)
367 1 3 if defined $ctx->{'pad'} and '' eq $ctx->{'pad'}
370 328 3 if ($code = $spec{$conv}) { }
3 0 elsif (1 < length $conv and $code = $spec{substr $conv, 1}) { }
377 8 323 unless defined $rslt
379 6 325 if (delete $ctx->{'change_case'} and $code = $case_change{$conv})
384 6 325 if delete $ctx->{'uc'}
389 76 38 if $ctx->{'wid'} and '' ne $ctx->{'pad'} and ($need = $ctx->{'wid'} - length($rslt)) > 0
398 91 23 unless defined $ctx->{'pad'}
400 105 9 unless defined $ctx->{'wid'}
401 114 0 defined $val ? :
408 12 2 unless defined $_[1]{'pad'}
414 2 1 unless defined $offset and $offset =~ / \A [+-]? [0-9]+ \z /msx
417 0 1 $offset < 0 ? :
423 0 1 $sec ? :
434 12 12 $date->__fmt_shire_accented ? :
8 16 unless defined(my $on_date = $date->__fmt_shire_accented ? __on_date_accented($month, $day) : __on_date($month, $day))
488 0 8 if $holiday =~ / \A [0-9]+ \z /msx
499 4 2 $year % 400 ? :
830 6 $year % 100 ? :
1035 836 $year % 4 ? :
514 20 738 unless defined $month
529 20 22 unless defined $month
547 0 14 if $month =~ / \A [0-9]+ \z /msx
701 0 387 unless defined $day
710 0 387 unless defined $day
713 2 385 unless (@on_date_accented)
726 142 356 if ($day)
756 0 366 unless defined $day
758 360 6 $month ? :
841 12 363 unless $month
893 0 264 unless my $ref = ref $date
896 63 201 unless 'HASH' eq $ref
901 126 0 $hash{'day'} < 7 ? :
906 138 63 unless defined $hash{'zone_name'}
918 0 63 if @{$checked{$pkg} ||= do { unless (ref $obj) { (my $fn = $pkg) =~ s[ :: ][/]gmsx; $fn .= '.pm'; require $fn unless $INC{$fn}; } ; my @missing; foreach my $method ('__fmt_shire_year', '__fmt_shire_month', '__fmt_shire_day', '__fmt_shire_hour', '__fmt_shire_minute', '__fmt_shire_second', '__fmt_shire_day_of_week', '__fmt_shire_nanosecond', '__fmt_shire_epoch', '__fmt_shire_zone_offset', '__fmt_shire_zone_name', '__fmt_shire_accented', '__fmt_shire_traditional') { push @missing, $method unless $pkg->can($method); } ; \@missing };}
919 0 1 unless (ref $obj)
922 0 0 unless $INC{$fn}
941 0 13 unless $pkg->can($method)
977 40 40 if ($source_count++) { }
979 0 860 if ($conflict{$key}) { }
620 240 elsif ($merged{$key}) { }
982 0 620 if ($merged{$key} != $hash{$key})
994 0 40 wantarray ? :
1017 174 0 'ARRAY' eq ref $_ ? :
1020 201 63 'HASH' eq ref $_ ? :
1023 1201 0 defined $_ && / \A [-+]? [0-9]+ \z /msx ? :
1031 63 0 ref $_ && eval { do { $_->can('isa') } } ? :
1034 286 0 defined $_ && !ref($_) ? :
1038 10713 480 defined $_ && / \A [0-9]+ \z /msx ? :
1043 0 480 defined $_ ? :
1058 0 700 unless $type_def{$type}
1065 0 7754 if @args > @spec
1072 13118 543 unless my $error = $type_def{$type}->()
1087 822 0 if defined $_
1116 36 0 unless defined $_[0]{$field}
1135 134 40 if defined $inx
1137 0 40 unless 'Date::Tolkien::Shire::Data' eq caller