Branch Coverage

blib/lib/Dir/Flock.pm
Criterion Covered Total %
branch 19 114 16.6


line true false branch
27 11 0 if (-f $rootdir and not -d $rootdir)
46 0 256 unless _validate_dir($dir)
55 0 91 if $P
56 0 91 if (defined $timeout and &Time::HiRes::time() > $expire)
58 0 0 if $P
62 0 91 if (&Time::HiRes::time() > $last_check + $HEARTBEAT_CHECK)
63 0 0 if $P
70 0 256 if $P
78 0 0 unless _validate_dir($dir)
87 0 0 if $P
88 0 0 if (defined $timeout and &Time::HiRes::time() > $expire)
90 0 0 if $P
94 0 0 if (&Time::HiRes::time() > $last_check + $HEARTBEAT_CHECK)
95 0 0 if $P
102 0 0 if $P
112 0 0 if ($op & 4)
115 0 0 if ($op & 2)
118 0 0 if ($op & 1)
121 0 0 if ($op & 8)
131 0 256 unless (defined $LOCK{$dir})
132 0 0 if &__inGD()
139 0 256 unless (defined $filename)
140 0 0 if &__inGD()
145 0 256 if $_DEBUG
146 0 256 unless (-f $filename)
147 0 0 if &__inGD()
154 256 0 if ($z)
155 0 256 if $_DEBUG
156 0 256 if $_DEBUG
160 0 0 if &__inGD()
174 0 0 unless $ok
181 0 0 unless $ok
189 0 0 unless ($ok or &__inGD())
202 0 0 unless (lock_ex($dir, $timeout))
207 0 0 if (wantarray) { }
213 0 0 if ($@)
217 0 0 wantarray ? :
222 0 0 unless (lock_sh($dir, $timeout))
227 0 0 if (wantarray) { }
233 0 0 if ($@)
237 0 0 wantarray ? :
244 0 0 unless $ENV{'HOSTNAME'} or $^O eq 'MSWin32' and $ENV{'COMPUTERNAME'}
249 0 1212 $INC{'threads.pm'} ? :
267 0 347 if ($excl)
270 347 0 if @f1 > 0
276 0 0 unless $file
281 0 0 if $_DEBUG
282 0 0 if $_DEBUG
289 0 0 if ($host eq _host() or $host eq 'localhost') { }
294 0 0 if $_DEBUG
299 0 0 if $_DEBUG
302 0 0 if (not $status)
314 603 0 if (opendir $dh, $dir) { }
324 0 256 unless (-d $dir)
329 0 0 if (not -r $dir and -w $dir and -x $dir)
339 7 0 if (defined ${^GLOBAL_PHASE}) { }
340 0 0 if %{^GLOBAL_PHASE} eq 'DESTRUCT'