Branch Coverage

lib/Time/Precise.pm
Criterion Covered Total %
branch 51 98 52.0


line true false branch
87 0 4 unless $Time::Precise::PRECISION
94 1 10 if ($arg < 0)
95 0 1 unless $] >= "5.012"
97 0 11 unless defined $arg
100 7 4 if (wantarray) { }
101 6 1 $gm ? :
102 7 0 if $Time::Precise::PRECISION
106 4 0 $gm ? :
107 0 4 unless defined $str
108 4 0 $Time::Precise::PRECISION ? :
157 2 0 unless ($Options{'no_range_check'})
158 0 2 if $month > 11 or $month < 0
163 0 2 if $month == 1 and _is_leap_year($year)
166 0 2 if $mday > $md or $mday < 1
167 0 2 if $hour > 23 or $hour < 0
168 0 2 if $min > 59 or $min < 0
169 0 2 if $sec > 59 or $sec < 0
174 0 2 unless ($Options{'no_range_check'} or abs $days < $MaxDay)
176 0 0 if $days > $MaxDay
184 0 2 if $year < 0 and not _is_leap_year($year)
194 5 1 if $_[0] % 4
195 0 1 if $_[0] % 100
196 0 1 if $_[0] % 400
207 0 0 if $_[5] < 0 and not _is_leap_year($_[5])
210 0 0 unless my $zone_off = $loc_for_ref_t - $ref_t
222 0 0 if (not $dst_off and $ref_t - 3600 - _timegm(&Time::Precise::localtime($loc_t - 3600)) < 0)
231 0 0 if $dst_off > 0
236 0 0 if $s != $_[0] or $m != $_[1] or $h != $_[2]
248 0 6 unless $year =~ /^\d+$/ and $month =~ /^\d+$/ and $day =~ /^\d+$/
252 0 6 unless $year
253 0 6 if $month < 1 or $month > 12
254 0 6 if $day < 1
255 2 4 if ($month == 2) { }
256 1 1 if (is_leap_year($year)) { }
257 0 1 if $day > 29
259 1 0 if $day > 28
262 2 2 if $day > $month_duration->{$month}
292 1 3 unless defined $time
293 3 1 $gmt ? :
296 4 0 $Time::Precise::PRECISION ? :
320 0 1 if @_ % 2
321 1 0 $gm ? :
332 0 6 unless $p->{$i} =~ /^(-){0,1}\d+(\.\d+){0,1}$/
334 0 1 if $p->{'month'} < 1 or $p->{'month'} > 12
336 0 3 unless $p->{$i} >= 0 and $p->{$i} < 60
338 0 0 is_leap_year($p->{'year'}) ? :
0 1 int $p->{'month'} == 2 ? :
339 0 1 unless $p->{'day'} >= 1 and $p->{'day'} <= $max_day
340 1 0 $gm ? :