Branch Coverage

blib/lib/JE/Object/Date.pm
Criterion Covered Total %
branch 244 270 90.3


line true false branch
65 370 0 defined blessed($_[0]) ? :
186 429 if (@_ >= 2) { }
8 421 elsif (@_ and defined blessed($_[0]) ? (my $prim = $_[0]->to_primitive)->isa('JE::String') : !looks_like_number($_[0])) { }
362 59 elsif (@_) { }
69 372 0 defined $_ ? :
73 120 66 defined $date ? :
79 79 665 defined blessed($_) && $_->can('to_number') ? :
83 32 154 if $year >= 0 and int $year <= 99
97 362 0 defined blessed($_[0]) && $_[0]->can('to_number') ? :
362 0 defined $_[0] ? :
137 113 1 @_ ? :
215 3 3645 if ($tmp == 4)
230 24 3621 if ($tmp == 4)
242 102 608 if $dwy < 31
245 608 3252 if $dwy < $_ + $ily
252 57 345 unless $mft
253 27 318 if $mft == 1
311 0 1006 unless $_[0] == $_[0] and $_[0] + 1 != $_[0]
318 14 217 unless $_[0] == $_[0] and $_[0] + 1 != $_[0]
331 1052 8 unless $$_ + 1 == $$_
343 870 7 unless $$_ + 1 == $$_
356 645 10 unless $$_ + 1 == $$_
363 691 11 unless $time + 1 == $time
364 17 648 if abs $time > 8640000000000000
378 7 12 if ($str =~ /^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[ ] (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ] ([ \d]\d)\ (\d\d):(\d\d):(\d\d)\ (\d{4,}) [ ]([+-]\d{2})(\d{2}) \z/x) { }
4 8 elsif ($str =~ /^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat),[ ] (\d\d?)[ ] (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[ ] (\d{4,})\ (\d\d):(\d\d):(\d\d)\ GMT \z/x) { }
393 5 3 if (defined($time = Date::Parse::str2time($str)))
397 16 3 defined $time ? :
439 11 1 defined $str ? :
461 85 3 defined $_ ? :
463 29 15 defined $date ? :
465 63 113 defined $_ ? :
467 28 16 if $year >= 0 and int $year <= 99
496 2 42 unless $_[0]->isa('JE::Object::Date')
532 2 40 unless $_[0]->isa('JE::Object::Date')
558 2 2 unless $_[0]->isa('JE::Object::Date')
601 1 132 unless $_[0]->isa('JE::Object::Date')
621 1 93 unless $_[0]->class eq 'Date'
644 0 62 unless $_[0]->isa('JE::Object::Date')
649 0 62 unless $v == $v
666 1 31 unless $_[0]->isa('JE::Object::Date')
671 1 30 unless $v == $v
688 1 74 unless $_[0]->isa('JE::Object::Date')
693 1 73 unless $v == $v
711 1 115 unless $_[0]->isa('JE::Object::Date')
716 1 114 unless $v == $v
733 1 103 unless $_[0]->isa('JE::Object::Date')
738 1 102 unless $v == $v
755 1 141 unless $_[0]->isa('JE::Object::Date')
761 1 140 unless $v == $v
778 1 127 unless $_[0]->isa('JE::Object::Date')
784 1 126 unless $v == $v
801 1 8 unless $_[0]->isa('JE::Object::Date')
807 1 7 unless $v == $v
824 1 8 unless $_[0]->isa('JE::Object::Date')
830 1 7 unless $v == $v
847 1 87 unless $_[0]->isa('JE::Object::Date')
853 1 86 unless $v == $v
870 1 74 unless $_[0]->isa('JE::Object::Date')
876 1 73 unless $v == $v
893 1 86 unless $_[0]->isa('JE::Object::Date')
899 1 85 unless $v == $v
916 1 73 unless $_[0]->isa('JE::Object::Date')
922 1 72 unless $v == $v
939 2 163 unless $_[0]->isa('JE::Object::Date')
945 2 161 unless $v == $v
968 3 178 unless $_[0]->isa('JE::Object::Date')
974 2 176 unless $v == $v
997 0 16 unless $_[0]->isa('JE::Object::Date')
1003 0 16 unless $v == $v
1021 1 4 unless $_[0]->isa('JE::Object::Date')
1026 3 1 defined $_[1] ? :
1046 2 10 unless $_[0]->isa('JE::Object::Date')
1052 8 2 defined $_[1] ? :
1082 2 8 unless $_[0]->isa('JE::Object::Date')
1087 6 2 defined $_[1] ? :
1089 2 6 if ($s != $s)
1094 4 2 defined $_[2] ? :
1098 0 6 if ($ms != $ms)
1131 1 6 unless $_[0]->isa('JE::Object::Date')
1136 5 1 defined $_[1] ? :
1138 1 5 if ($m != $m)
1143 3 2 defined $_[2] ? :
1147 2 3 defined $_[3] ? :
1151 0 5 if ($s != $s or $ms != $ms)
1174 1 6 unless $_[0]->isa('JE::Object::Date')
1179 5 1 defined $_[1] ? :
1181 1 5 if ($m != $m)
1186 3 2 defined $_[2] ? :
1190 2 3 defined $_[3] ? :
1194 0 5 if ($s != $s or $ms != $ms)
1217 1 7 unless $_[0]->isa('JE::Object::Date')
1222 6 1 defined $_[1] ? :
1224 1 6 if ($h != $h)
1229 4 2 defined $_[2] ? :
1233 3 3 defined $_[3] ? :
1237 2 4 defined $_[4] ? :
1241 0 6 if ($m != $m or $s != $s or $ms != $ms)
1264 1 7 unless $_[0]->isa('JE::Object::Date')
1269 6 1 defined $_[1] ? :
1271 1 6 if ($h != $h)
1276 4 2 defined $_[2] ? :
1280 3 3 defined $_[3] ? :
1284 2 4 defined $_[4] ? :
1288 0 6 if ($m != $m or $s != $s or $ms != $ms)
1311 1 4 unless $_[0]->isa('JE::Object::Date')
1316 3 1 defined $_[1] ? :
1318 1 3 if ($d != $d)
1346 1 4 unless $_[0]->isa('JE::Object::Date')
1351 3 1 defined $_[1] ? :
1353 1 3 if ($d != $d)
1381 1 16 unless $_[0]->isa('JE::Object::Date')
1386 15 1 defined $_[1] ? :
1388 1 15 if ($m != $m)
1393 2 13 defined $_[2] ? :
1420 1 16 unless $_[0]->isa('JE::Object::Date')
1425 15 1 defined $_[1] ? :
1427 1 15 if ($m != $m)
1432 2 13 defined $_[2] ? :
1459 0 0 unless $_[0]->isa('JE::Object::Date')
1464 0 0 defined $_[1] ? :
1466 0 0 if ($y != $y)
1470 0 0 if $inty >= 0 and $inty <= 99
1472 0 0 unless $v == $v
1496 1 17 unless $_[0]->isa('JE::Object::Date')
1501 16 1 defined $_[1] ? :
1503 1 16 if ($y != $y)
1508 14 2 defined $_[2] ? :
1512 2 14 defined $_[3] ? :
1539 1 17 unless $_[0]->isa('JE::Object::Date')
1544 16 1 defined $_[1] ? :
1546 1 16 if ($y != $y)
1551 14 2 defined $_[2] ? :
1555 2 14 defined $_[3] ? :
1581 0 0 unless $_[0]->isa('JE::Object::Date')