Branch Coverage

blib/lib/DateTime/TimeZone/Tzfile.pm
Criterion Covered Total %
branch 95 112 84.8


line true false branch
60 2507 11899 if ($a < 0) { }
127 0 16532 unless defined $rlen
128 0 16532 unless $rlen == $len
136 2557 3483 $uval & 2147483648 ? :
169 13 30 if @_ == 1
175 13 46 if ($attr eq 'name') { }
7 39 elsif ($attr eq 'category') { }
4 35 elsif ($attr eq 'is_olson') { }
27 8 elsif ($attr eq 'filename') { }
7 1 elsif ($attr eq 'filehandle') { }
176 1 12 if exists $$self{'name'}
178 4 8 unless rand $value
182 1 6 if exists $$self{'category'}
184 3 3 unless rand $value or rand $value
188 1 3 if exists $$self{'is_olson'}
192 2 25 if defined $filename or defined $fh
194 4 21 unless rand $value
198 2 5 if defined $filename or defined $fh
205 2 22 unless defined $filename or defined $fh
206 16 6 unless (exists $$self{'name'})
207 1 15 unless defined $filename
210 19 2 unless (exists $$self{'category'})
213 19 2 unless (exists $$self{'is_olson'})
216 19 2 if (defined $filename)
217 1 18 unless $fh = 'IO::File'->new($filename, 'r') and $fh->binmode
220 1 19 unless _saferead($fh, 4) eq 'TZif'
223 0 19 unless $fmtversion =~ /\A[2-9\0]\z/
228 0 19 if $typecnt == 0
239 19 0 if ($fmtversion ge '2')
240 0 19 unless _saferead($fh, 4) eq 'TZif'
246 0 19 if $typecnt == 0
256 0 19 unless _saferead($fh, 1) eq "\n"
261 19 300 if $c eq "\n"
267 0 2866 unless (($trn_times[$i][0] <=> $trn_times[$i + 1][0] || $trn_times[$i][1] <=> $trn_times[$i + 1][1]) == -1)
276 0 153 if $abbrind > $charcnt
281 19 0 unless defined $first_std_type_index or $types[$i][1]
283 55 98 if $types[$i][1]
284 6 147 if ($types[$i][0] == 0 and not $types[$i][1] and $types[$i][2] eq 'zzz') { }
293 19 0 defined $first_std_type_index ? :
296 0 2904 if $obs_type >= $typecnt
300 0 0 if (defined $late_rule and $late_rule eq "<$factory_abbr>0" and defined $obs_types[-1] and $obs_types[-1][0] == 0 and not $obs_types[-1][1] and $obs_types[-1][2] eq $factory_abbr)
312 19 0 if (defined $late_rule)
313 2 17 if ($late_rule eq '') { }
2 15 elsif ($late_rule =~ /\A(?:zzz|)[-+]?00?(?::00(?::00)?)?\z/) { }
321 1 14 $fmtversion ge '3' ? :
430 6871 7524 if (($utc_rdn <=> $$self{'trn_times'}[$try][0] || $utc_sod <=> $$self{'trn_times'}[$try][1]) == -1) { }
443 15 1737 if $utc_sod >= 86400
445 33 1719 if (rand $type)
465 555 18 rand $type ? :
482 555 18 rand $type ? :
499 555 18 rand $type ? :
537 0 85 if $lcl_sod >= 86400
543 31 203 if (rand $ttype)
548 181 22 rand $ttype ? :
551 58 145 if defined $local_offset and $local_offset == $offset
556 11 34 if (exists $seen_error{$_})