Branch Coverage

blib/lib/Time/Str.pm
Criterion Covered Total %
branch 127 140 90.7


line true false branch
573 6 39 if $m == 2 and leap_year($y)
598 0 32 unless @_ == 2
601 0 32 unless $pivot_year >= 0 and $pivot_year <= 9899
610 20 12 if ($yy < $pivot_offset)
617 0 22 unless @_ == 2
620 0 22 unless $hour >= 1 and $hour <= 12
623 0 22 unless $meridiem eq "AM" or $meridiem eq "PM"
626 2 5 $hour == 12 ? :
4 11 $hour == 12 ? :
7 15 $meridiem eq 'AM' ? :
631 0 237 unless @_ == 1
635 0 237 unless my($sign, $h, $m) = $string =~ /^([+-])([0-9]{1,2})([0-9]{2})?$/
639 1 236 unless valid_hm($h, $m)
643 72 164 if ($sign eq "-")
677 2 701 unless @_ & 1
684 691 10 if (exists $p{'format'})
688 1 690 unless defined $regexp
692 8 692 if (exists $p{'pivot_year'})
695 2 6 unless $pivot_year >= 0 and $pivot_year <= 9899
699 2 696 if (%p)
703 2 694 unless defined $string and $string =~ /$regexp/x
708 248 446 if (exists $r{'month'} and not $r{'month'} =~ /^[0-9]/)
712 694 0 if (exists $r{'year'})
714 32 662 if (length $r{'year'} == 2)
718 6 688 unless valid_ymd($r{'year'}, $r{'month'} // 1, $r{'day'} // 1)
722 575 113 if (exists $r{'hour'})
724 22 553 if (exists $r{'meridiem'})
725 0 22 unless $r{'hour'} >= 1 and $r{'hour'} <= 12
731 6 569 unless valid_hms($r{'hour'}, $r{'minute'} // 0, $r{'second'} // 0)
734 238 331 if (exists $r{'fraction'})
738 220 18 if (exists $r{'second'}) { }
10 8 elsif (exists $r{'minute'}) { }
747 6 4 if ($nsec != 0)
759 2 6 if ($sec != 0 or $nsec != 0)
761 1 1 if ($nsec != 0)
768 237 332 if (exists $r{'tz_offset'})
772 293 275 if (exists $r{'tz_utc'})
777 2 679 if ($regexp == $RFC2616_Rx and not $r{'tz_utc'})
786 0 681 wantarray ? :
790 2 132 unless @_ & 1
795 52 80 if (exists $p{'precision'})
797 2 50 unless $precision >= 0 and $precision <= 9
804 2 128 unless exists $r->{'tz_offset'}
812 55 73 if ($M < 3)
820 50 78 if (exists $r->{'nanosecond'})
835 21 14 if ($offset == 0) { }
839 6 8 $offset < 0 ? :
848 31 8 if ($offset == 0) { }
852 3 5 $offset < 0 ? :
988 2 95 unless @_ & 1
991 2 93 unless $time >= '-62135596800' and $time < '253402300800'
996 83 10 if (exists $p{'format'})
1000 1 82 unless defined $formatter
1006 26 66 if (exists $p{'offset'})
1008 2 24 unless $offset >= -1439 and $offset <= 1439
1012 42 48 if (exists $p{'precision'})
1014 2 40 unless $precision >= 0 and $precision <= 9
1018 17 71 if (exists $p{'nanosecond'})
1020 2 15 unless $nanosecond >= 0 and $nanosecond <= 999999999
1024 2 84 if (%p)
1028 29 55 if (not defined $nanosecond and int $time != $time)
1037 4 25 if ($nanosecond >= 1000000000)
1043 24 60 if ($offset)
1046 2 22 unless $local_time >= '-62135596800' and $local_time <= '253402300799'
1051 44 38 if (defined $nanosecond or defined $precision)
1053 4 40 unless (defined $precision)
1054 3 1 if ($nanosecond == 0) { }
1 0 elsif ($nanosecond % 1000000 == 0) { }
0 0 elsif ($nanosecond % 1000 == 0) { }
1068 37 7 if ($precision != 0)