Branch Coverage

lib/Parallel/WorkUnit.pm
Criterion Covered Total %
branch 129 220 58.6


line true false branch
35 5781 0 if ($#_ == 0) { }
0 0 elsif ($#_ == 1) { }
55 4025 241 if ($#_ == 0) { }
241 0 elsif ($#_ == 1) { }
68 13992 241 if ($#_ == 0) { }
241 0 elsif ($#_ == 1) { }
81 2719 3467 if ($#_ == 0) { }
3467 0 elsif ($#_ == 1) { }
85 139 2580 unless (exists $self->{'_ordered_count'})
99 2609 748 if ($#_ == 0) { }
748 0 elsif ($#_ == 1) { }
103 187 2422 unless (exists $self->{'_ordered_responses'})
117 11126 866 if ($#_ == 0) { }
866 0 elsif ($#_ == 1) { }
120 84 11042 unless (exists $self->{'max_children'})
127 774 92 if (defined $val)
128 132 642 unless ($val =~ /^[0-9]+$/s)
131 66 576 if ($val <= 0)
149 42195 241 if ($#_ == 0) { }
241 0 elsif ($#_ == 1) { }
153 376 41819 unless (exists $self->{'_subprocs'})
168 0 241 if ($#_ == 0) { }
241 0 elsif ($#_ == 1) { }
172 0 0 unless (exists $self->{'_count'})
187 0 388 if ($#_ == 0) { }
388 0 elsif ($#_ == 1) { }
202 23179 241 if ($#_ == 0) { }
241 0 elsif ($#_ == 1) { }
205 338 22841 unless (exists $self->{'_queued_children'})
235 132 256 if (scalar @_ > 0)
236 66 66 scalar @_ == 1 ? :
238 0 132 if (exists $args{'use_anyevent'})
241 132 0 if (exists $args{'max_children'})
251 0 5497 if ($#_ < 1)
256 7 5490 unless (_codelike($sub))
261 2719 2771 if (scalar @_ == 0) { }
2771 0 elsif (scalar @_ == 1) { }
271 2102 0 if (defined $selfref)
283 0 5490 if (defined $self->_last_error)
289 5255 235 if ($pid) { }
302 0 5255 if ($self->use_anyevent)
318 0 82 if ($#_ < 2)
322 0 82 if (scalar @_ > 1)
324 0 82 unless ($children =~ /^[1-9][0-9]*$/s)
336 0 235 if (scalar @_ != 3)
357 0 4532 if ($#_ != 0)
361 507 4025 if (scalar keys %{$self->_subprocs;} == 0)
362 0 507 if ($self->use_anyevent)
370 0 4025 if (defined $self->_cv)
372 0 0 if (defined $self->_last_error)
383 3992 0 if ($self->_waitone)
392 0 507 if ($#_ != 0)
405 0 458 if ($#_ != 0)
411 0 454 if (defined $self->_last_error)
424 0 4483 if ($#_ != 0)
429 8 4475 unless (keys %$sp)
440 13366 0 if (defined $fh->fileno)
441 4475 8891 if ($fh->fileno == $sp->{$child}{'fh'}->fileno)
462 0 8 if ($#_ != 1)
467 0 8 if (defined $self->_last_error)
479 0 8 if ($#_ != 1)
482 4 4 unless (exists $self->_subprocs->{$pid})
499 0 9657 if ($#_ != 0)
508 0 3459 if ($#_ < 1)
513 7 3452 unless (_codelike($sub))
518 1301 2151 if (scalar @_ == 0) { }
2151 0 elsif (scalar @_ == 1) { }
528 0 3452 if (defined $self->_last_error)
536 0 51 if ($#_ < 2)
542 215 139 if (scalar @_ > 0) { }
552 0 228 if ($#_ != 2)
559 0 7 if ($#_ != 2)
566 0 235 if ($#_ != 3)
570 1 234 if (builtin::blessed($data) and $data->can('FREEZE') and $data->can('THAW')) { }
576 0 233 unless (defined $msg)
595 0 4479 if ($#_ != 1)
599 0 4479 if (defined $cinfo->{'rawbuff'}) { }
607 0 0 if ($#_ != 1)
616 0 0 unless (defined $type)
617 0 0 unless (defined $size)
621 0 0 if ($class eq '') { }
631 0 0 if ($type eq 'RESULT') { }
641 0 0 if ($self->use_anyevent) { }
654 0 4479 if ($#_ != 1)
661 0 4479 unless (defined $type)
677 4479 0 if (defined $ret)
682 4478 1 if ($class eq '') { }
692 4460 19 if ($type eq 'RESULT') { }
702 0 19 if ($self->use_anyevent) { }
717 0 8576 if ($#_ != 0)
720 3988 4588 unless (@{$self->_queued_children;})
721 0 4588 if (defined $self->_last_error)
725 3340 2368 if (not defined $self->max_children or $self->count < $self->max_children) { }
728 1245 2095 if (not defined $ele->[1]) { }
745 0 0 if ($#_ < 1)
746 0 0 if ($#_ > 2)
749 0 0 if (not $old and $new) { }
0 0 elsif ($old and not $new) { }
753 0 0 if (defined $self->_subprocs)
764 0 0 if (defined $self->_subprocs)
779 0 0 if ($#_ != 1)
789 0 0 if (scalar keys %{$self->_subprocs;} == 0)
805 0 241 if ($#_ != 0)
826 0 5 if ($#_ != 1)
831 0 5 unless (_codelike($sub))
837 2 3 unless ($pid)
850 0 8961 if (scalar @_ != 1)
853 8947 14 if (builtin::reftype($thing))
854 0 14 if (builtin::blessed($thing) and overload::Method($thing, "()"))
863 1 343 if (scalar keys %{$self->_subprocs;})