Branch Coverage

blib/lib/Time/P.pm
Criterion Covered Total %
branch 104 188 55.3


line true false branch
232 186 4 exists ${__rest}{'locale'} ? :
185 5 exists ${__rest}{'strict'} ? :
181 9 exists ${__rest}{'struct'} ? :
237 0 190 unless @res
239 190 0 if $strict
247 0 190 if (@res)
263 585 567 if (exists $parser{$tok}) { }
0 567 elsif ($tok =~ /^%/) { }
282 175 15 unless (defined $mday)
283 0 190 if (not defined $mday and defined(my $Od = $struct->{'Od'}))
287 0 190 if (not defined $mday and defined(my $Oe = $struct->{'Oe'}))
298 92 98 unless (defined $year)
299 82 10 if (defined $struct->{'G'}) { }
0 10 elsif (defined $struct->{'C'}) { }
0 10 elsif (defined $struct->{'y'}) { }
0 10 elsif (defined $struct->{'g'}) { }
304 0 0 if defined $struct->{'y'}
305 0 0 if (defined $struct->{'g'} and not defined $struct->{'y'})
312 0 0 if ($year < 'Time::C'->now_utc->year - 50)
316 0 0 if ($year < 'Time::C'->now_utc->year - 50)
320 10 180 unless (defined $year)
324 1 9 if (defined $EC) { }
0 9 elsif (defined $Ey) { }
328 0 1 if $EC ne $fields[4]
331 0 1 if $s{'year'} < 1
333 1 0 if defined $Ey
334 0 1 unless defined $Ey
343 0 0 if $s{'year'} < 1
345 0 0 if $s{'year'} > 'Time::C'->now_utc->year
352 0 190 if (not defined $year and defined(my $Oy = $struct->{'Oy'}))
354 0 0 if (defined(my $C = $struct->{'C'})) { }
0 0 elsif (defined(my $OC = $struct->{'OC'})) { }
362 0 0 unless (defined $struct->{'C'})
364 0 0 if ($year < 'Time::C'->now_utc->year - 50)
374 28 162 unless (defined $wday)
375 0 28 if (defined $struct->{'A'}) { }
8 20 elsif (defined $struct->{'a'}) { }
381 20 170 unless (defined $wday)
382 0 20 if (defined(my $Ou = $struct->{'Ou'})) { }
0 20 elsif (defined(my $Ow = $struct->{'Ow'})) { }
390 19 171 if defined $wday and $wday == 0
398 0 190 if (not defined $u_week and defined(my $OU = $struct->{'OU'}))
409 0 190 if (not defined $w_week and defined(my $OW = $struct->{'OW'}))
420 0 190 if (not defined $v_week and defined(my $OV = $struct->{'OV'}))
430 179 11 unless (defined $month)
431 0 179 if (defined $struct->{'B'}) { }
6 173 elsif (defined $struct->{'b'}) { }
437 0 190 if (not defined $month and defined(my $Om = $struct->{'Om'}))
447 179 11 unless (defined $hour)
448 179 11 unless (defined $hour)
450 0 179 if (defined $hour and length $struct->{'p'})
451 0 0 if (_get_index($struct->{'p'}, @{get_locale('am_pm', $locale);})) { }
453 0 0 if ($hour < 12)
456 0 0 if ($hour == 12)
461 0 190 if (not defined $hour and defined(my $OH = $struct->{'OH'})) { }
0 201 elsif (not defined $hour and defined(my $OI = $struct->{'OI'})) { }
467 0 0 if (length $struct->{'p'})
468 0 0 if (_get_index($struct->{'p'}, @{get_locale('am_pm', $locale);})) { }
470 0 0 if ($hour < 12)
473 0 0 if ($hour == 12)
484 0 190 if (not defined $min and defined(my $OM = $struct->{'OM'}))
495 0 190 if (not defined $sec and defined(my $OS = $struct->{'OS'}))
526 0 190 if (not defined $w_week and defined $u_week)
528 0 0 unless (defined $wday)
529 0 0 if $wday == 7
532 82 108 if (not defined $v_week and defined $w_week)
533 0 82 if ($wyear)
538 36 46 if ($t->day_of_week > 1 and $t->day_of_week < 5)
541 54 136 if ($wyear and defined $v_week and $v_week > 1) { }
55 81 elsif (defined $v_week and $v_week > 1 and defined $year) { }
0 136 elsif (defined $v_week and $v_week > 1 and defined $orig->{'year'}) { }
546 0 55 if ('Time::C'->mktime('year', $year, 'week', $v_week)->year == $year + 1)
547 0 0 unless defined $month
551 0 0 if ('Time::C'->mktime('year', $orig->{'year'}, 'week', $v_week)->year == $orig->{'year'} + 1)
552 0 0 unless defined $month
567 1 189 if (defined $tz)
569 0 1 unless defined eval { do { 'Time::C'->now($tz) } }
574 0 190 defined $offset ? :
578 11 179 if defined $sec
579 11 179 if defined $min
580 11 179 if defined $hour
581 17 173 if defined $mday
582 17 173 if defined $month
583 164 26 if defined $v_week
584 170 20 if defined $wday
585 0 190 if defined $yday
586 181 9 if defined $year
587 0 190 if defined $epoch
588 1 189 if defined $tz
589 0 190 if defined $offset_n
596 0 0 $sign eq '+' ? :
600 0 14 if (not @haystack and $needle eq '')
603 14 57 if $haystack[$i] eq $needle
610 18 9 $type eq 'period' ? :