Branch Coverage

blib/lib/Time/Piece.pm
Criterion Covered Total %
branch 106 148 71.6


line true false branch
52 1 21 unless eval { do { $_[0]->isa('Time::Piece') } }
55 8 14 unless defined $time
60 2 21 unless eval { do { $_[0]->isa('Time::Piece') } }
63 5 18 unless defined $time
74 27 60 if ref $_[1] eq 'ARRAY'
75 8 52 if &blessed($_[1]) and $_[1]->isa('Time::Piece')
87 4 7 if ($class->_is_time_struct($time)) { }
4 3 elsif (defined $time) { }
1 2 elsif (ref $class and $class->isa('Time::Piece')) { }
88 2 2 $time->[10] ? :
111 0 0 if (@_ > 1) { }
126 31 45 if ($class->_is_time_struct($time))
129 2 29 $islocal ? :
131 0 31 wantarray ? :
134 24 21 $islocal ? :
138 0 45 wantarray ? :
149 18 0 if (exists $_special_exports{$method}) { }
164 0 9 if (delete $params{':override'}) { }
212 1 2 if (@_) { }
2 0 elsif (@MON_LIST) { }
227 0 0 if (@_) { }
0 0 elsif (@FULLMON_LIST) { }
251 1 1 $res > 9 ? :
268 1 1 if (@_) { }
1 0 elsif (@DAY_LIST) { }
283 0 0 if (@_) { }
0 0 elsif (@FULLDAY_LIST) { }
312 0 3 unless $time->[10]
331 0 3 $delta >= 0 ? :
336 95 0 if (defined $time->[9]) { }
343 0 0 $time->[10] ? :
351 4 5 @_ ? :
359 5 6 @_ ? :
367 1 2 @_ ? :
373 1 2 @_ ? :
390 6 19 if $time->[10]
416 17 14 $m > 2 ? :
417 17 14 $m > 2 ? :
443 0 11 if $self->[10]
460 3 3 $year % 4 == 0 && !($year % 100 == 0) || $year % 400 == 0 ? :
476 1 1 $_mon == 1 ? :
578 44 0 @_ ? :
581 4 40 unless $format =~ /%/
593 20 0 @_ ? :
594 0 20 ref $time ? :
603 3 1 if ref $_[0] and $_[0]->isa('Time::Piece')
605 2 2 if (@_)
613 3 1 if ref $_[0] and $_[0]->isa('Time::Piece')
615 2 2 if (@_)
623 4 1 if ref $_[0] and $_[0]->isa('Time::Piece')
625 2 3 if (@_)
632 4 1 if ref $_[0] and $_[0]->isa('Time::Piece')
634 2 3 if (@_)
646 4 14 if ($time->[10]) { }
657 3 0 if (&blessed($rhs) and $rhs->isa('Time::Piece'))
660 0 3 $reverse ? :
671 1 2 if (shift())
682 1 1 if (&blessed($rhs) and $rhs->isa('Time::Piece')) { }
703 3 5 unless (&blessed($rhs) and $rhs->isa('Time::Piece'))
706 0 8 if ($reverse)
720 1 7 unless defined $num_months
724 5 2 if ($final_month > 11 or $final_month < 0)
727 2 3 if ($final_month < 0 and $final_month % 12 == 0) { }
733 4 1 if $final_month < 0
751 0 0 unless exists $params{'to'}
763 0 0 unless defined $to
765 0 0 if ($params{'to'} eq 'quarter')
782 103 21 unless exists $trans_map->{$flag}
796 124 129 if $format =~ /\G%([a-zA-Z])/cg
798 65 64 if $format =~ /\G(.)/cg
819 0 0 if (@{$locales->{'weekday'};} < 7) { }
826 0 0 if (@{$locales->{'wday'};} < 7) { }
833 0 0 if (@{$locales->{'month'};} < 12) { }
839 0 0 if (@{$locales->{'mon'};} < 12) { }