Branch Coverage

blib/lib/Dir/Flock.pm
Criterion Covered Total %
branch 43 112 38.3


line true false branch
28 0 10 if (-f $rootdir and not -d $rootdir)
48 0 15 unless _validate_dir($dir)
57 0 8929 if $P
58 5 8924 if (defined $timeout and &Time::HiRes::time() > $expire)
60 0 5 if $P
64 1 8923 if (&Time::HiRes::time() > $last_check + $HEARTBEAT_CHECK)
65 0 1 if $P
72 0 10 if $P
80 0 4 unless _validate_dir($dir)
89 0 2752 if $P
90 1 2751 if (defined $timeout and &Time::HiRes::time() > $expire)
92 0 1 if $P
96 0 2751 if (&Time::HiRes::time() > $last_check + $HEARTBEAT_CHECK)
97 0 0 if $P
104 0 3 if $P
111 1 13 unless (defined $LOCK{$dir})
112 0 1 if &__inGD()
119 0 13 unless (defined $filename)
120 0 0 if &__inGD()
125 0 13 if $_DEBUG
126 0 13 unless (-f $filename)
127 0 0 if &__inGD()
134 13 0 if ($z)
135 0 13 if $_DEBUG
139 0 0 if &__inGD()
152 2 3 if ($op & 8)
156 1 2 if ($op & 4)
159 3 0 if ($op & 2)
162 0 0 if ($op & 1)
178 0 0 unless $ok
185 0 0 unless $ok
193 0 0 unless ($ok or &__inGD())
206 0 0 unless (lock_ex($dir, $timeout))
211 0 0 if (wantarray) { }
217 0 0 if ($@)
221 0 0 wantarray ? :
226 0 0 unless (lock_sh($dir, $timeout))
231 0 0 if (wantarray) { }
237 0 0 if ($@)
241 0 0 wantarray ? :
248 0 0 unless $ENV{'HOSTNAME'} or $^O eq 'MSWin32' and $ENV{'COMPUTERNAME'}
253 0 23429 $INC{'threads.pm'} ? :
271 11695 0 if ($CHECK_DELAY)
278 0 11695 if ($excl)
281 11695 0 if @f1 > 0
287 0 1 unless $file
292 0 1 if $_DEBUG
293 0 1 if $_DEBUG
300 1 0 if ($host eq _host() or $host eq 'localhost') { }
305 0 1 if $_DEBUG
310 0 0 if $_DEBUG
313 1 0 if (not $status)
332 0 19 unless (-d $dir)
337 0 0 if (not -r $dir and -w $dir and -x $dir)
347 14 0 if (defined ${^GLOBAL_PHASE}) { }
348 0 1 if %{^GLOBAL_PHASE} eq 'DESTRUCT'