Branch Coverage

blib/lib/Parallel/Scoreboard.pm
Criterion Covered Total %
branch 20 36 55.5


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