Branch Coverage

blib/lib/Parallel/Scoreboard.pm
Criterion Covered Total %
branch 19 36 52.7


line true false branch
22 0 2 unless $args{'base_dir'}
24 0 2 unless (-e $args{'base_dir'})
26 0 0 unless mkpath($args{'base_dir'}) or -e $args{'base_dir'}
42 2 0 if ($self->{'fh'})
45 1 1 if $self->{'base_dir'}
53 0 2 if ($self->{'fh'} and $self->{'id_for_fh'} ne $id)
58 2 0 unless ($self->{'fh'})
60 0 2 unless open my $fh, '>', "$fn.tmp"
63 0 2 unless flock $fh, 2
65 0 2 unless rename "$fn.tmp", $fn
71 0 2 unless seek $self->{'fh'}, 0, 0
88 0 8 unless seek $fh, 0, 0
92 0 8 if length $data < 20
99 0 8 if md5($status) ne $md5
121 0 9 unless $fn =~ m[/status_(.*)$]
125 0 9 unless open my $fh, '+<', $fn
128 1 8 if ($id ne $self->worker_id->() and flock $fh, 6)
134 0 1 unless unlink $fn