Branch Coverage

blib/lib/DateTime/TimeZone/Local/Unix.pm
Criterion Covered Total %
branch 21 56 37.5


line true false branch
40 0 4 unless -r $lt_file and -s _
43 4 0 if (-l $lt_file)
51 4 0 if (defined $real_name)
54 25 0 if defined $_
58 7 4 $x < $#parts ? :
70 3 8 if $tz
101 0 0 unless -d $zone_info_dir
118 0 0 if (not defined $real_name and -f $_ and not -l $_ and $size == -s _ and File::Basename::basename($_) ne "posixrules" and File::Compare::compare($_, $file_to_match) == 0)
143 0 0 unless ref $_ and $_->{'found'}
153 1 2 unless -f $tz_file and -r _
155 0 2 unless open my $fh, "<", $tz_file
158 0 2 unless close $fh
162 0 2 unless $class->_IsValidName($name)
175 1 0 unless -f $tz_file and -r _
178 0 0 unless open my $fh, "<", $tz_file
183 0 0 if ($name =~ /\A\s*TZ\s*=\s*(\S+)/)
189 0 0 unless close $fh
191 0 0 unless $class->_IsValidName($name)
205 1 1 unless -r $clock_file and -f _
209 0 1 unless $class->_IsValidName($name)
223 0 0 unless open my $fh, "<", $clock_file
229 0 0 if /^(?:TIME)?ZONE="([^"]+)"/
232 0 0 unless close $fh
239 0 2 unless -r $init_file and -f _
243 0 2 unless $class->_IsValidName($name)
258 0 1 unless open my $fh, "<", $init_file
264 1 0 if /^TZ=(.+)/
267 0 0 unless close $fh