Branch Coverage

lib/Ubic/Lockf.pm
Criterion Covered Total %
branch 18 28 64.2


line true false branch
26 2 56 unless defined $fh
51 406 0 if (ref $param eq '') { }
52 0 406 unless open $fh, '>>', $param
58 331 75 unless (&_lockf($fh, $opts, $fname))
63 0 75 if defined $opts->{'mode'}
75 0 406 $opts->{'shared'} ? :
77 336 70 if (not $opts->{'blocking'} or defined $opts->{'timeout'} and not $opts->{'timeout'})
81 5 331 if flock $fh, $mode | 4
82 331 0 if $! == 11
86 1 69 if (not flock($fh, $mode | 4)) { }
88 0 1 if (-t STDOUT)
95 0 1 if ($opts->{'timeout'}) { }
98 0 0 unless flock $fh, $mode
100 0 1 unless flock $fh, $mode