Branch Coverage

blib/lib/Time/Piece.pm
Criterion Covered Total %
branch 125 150 83.3


line true false branch
52 1 26 unless eval { do { $_[0]->isa('Time::Piece') } }
55 8 19 unless defined $time
60 2 31 unless eval { do { $_[0]->isa('Time::Piece') } }
63 7 26 unless defined $time
74 121 329 if ref $_[1] eq 'ARRAY'
75 8 321 if &blessed($_[1]) and $_[1]->isa('Time::Piece')
87 4 9 if ($class->_is_time_struct($time)) { }
6 3 elsif (defined $time) { }
1 2 elsif (ref $class and $class->isa('Time::Piece')) { }
88 2 2 $time->[10] ? :
111 2 2 if (@_ > 1) { }
126 125 312 if ($class->_is_time_struct($time))
130 26 99 $islocal ? :
132 0 125 wantarray ? :
135 29 283 $islocal ? :
139 0 312 wantarray ? :
150 28 0 if (exists $_special_exports{$method}) { }
165 0 14 if (delete $params{':override'}) { }
213 1 4 if (@_) { }
4 0 elsif (@MON_LIST) { }
228 0 1 if (@_) { }
1 0 elsif (@FULLMON_LIST) { }
252 1 1 $res > 9 ? :
269 1 4 if (@_) { }
4 0 elsif (@DAY_LIST) { }
284 0 2 if (@_) { }
2 0 elsif (@FULLDAY_LIST) { }
313 0 3 unless $time->[10]
332 0 3 $delta >= 0 ? :
337 707 0 if (defined $time->[9]) { }
344 0 0 $time->[10] ? :
352 8 5 @_ ? :
360 9 6 @_ ? :
368 1 2 @_ ? :
374 1 2 @_ ? :
391 6 19 if $time->[10]
417 17 14 $m > 2 ? :
418 17 14 $m > 2 ? :
444 0 11 if $self->[10]
461 3 3 $year % 4 == 0 && !($year % 100 == 0) || $year % 400 == 0 ? :
477 1 1 $_mon == 1 ? :
579 188 96 @_ ? :
582 22 262 unless $format =~ /%/
594 68 0 @_ ? :
595 48 20 ref $time ? :
604 4 1 if ref $_[0] and $_[0]->isa('Time::Piece')
606 3 2 if (@_)
614 3 1 if ref $_[0] and $_[0]->isa('Time::Piece')
616 2 2 if (@_)
624 4 1 if ref $_[0] and $_[0]->isa('Time::Piece')
626 2 3 if (@_)
633 4 1 if ref $_[0] and $_[0]->isa('Time::Piece')
635 2 3 if (@_)
647 4 22 if ($time->[10]) { }
658 5 0 if (&blessed($rhs) and $rhs->isa('Time::Piece'))
661 0 5 $reverse ? :
672 1 203 if (shift())
683 1 202 if (&blessed($rhs) and $rhs->isa('Time::Piece')) { }
704 3 19 unless (&blessed($rhs) and $rhs->isa('Time::Piece'))
707 0 22 if ($reverse)
721 1 34 unless defined $num_months
725 6 28 if ($final_month > 11 or $final_month < 0)
728 2 4 if ($final_month < 0 and $final_month % 12 == 0) { }
734 4 2 if $final_month < 0
752 2 21 unless exists $params{'to'}
764 2 19 unless defined $to
766 13 6 if ($params{'to'} eq 'quarter')
783 1249 315 unless exists $trans_map->{$flag}
797 1564 1857 if $format =~ /\G%([a-zA-Z])/cg
799 1505 352 if $format =~ /\G(.)/cg
810 0 1 if (not $locales->{'PM'} && $locales->{'AM'} or $locales->{'PM'} eq $locales->{'AM'})
826 0 1 if (@{$locales->{'weekday'};} < 7) { }
833 0 1 if (@{$locales->{'wday'};} < 7) { }
840 0 1 if (@{$locales->{'month'};} < 12) { }
846 0 1 if (@{$locales->{'mon'};} < 12) { }