Branch Coverage

blib/lib/Parallel/Iterator.pm
Criterion Covered Total %
branch 65 82 79.2


line true false branch
330 21 6 if ('ARRAY' eq ref $iter) { }
2 4 elsif ('HASH' eq ref $iter) { }
4 0 elsif ('CODE' eq ref $iter) { }
334 76 50126 if $pos >= @ar
344 2 10 unless @k
362 542 9 if (my(@next) = &$iter()) { }
366 424 118 if defined $work and ref $work
368 0 542 if (my $err = $@) { }
400 0 76 unless pipe $child_rdr, $my_wtr
403 0 76 unless pipe $my_rdr, $child_wtr
406 76 0 if (my $pid = fork) { }
425 0 0 $err ? :
443 928 361 if @result_queue
444 344 17 if ($select->count)
450 939 75 if (defined(my $results = _get_obj($rh))) { }
452 928 11 if ($type eq 'R') { }
11 0 elsif ($type eq 'E') { }
465 938 0 unless ($eof)
466 863 75 if (my(@next) = &$iter()) { }
483 1 343 if (my $err = $@)
505 6 4 if (my $adapt = $$options{'adaptive'}) { }
509 4 2 unless 'ARRAY' eq ref $adapt
513 4 2 unless defined $min and $min > 1
520 44 730 if $batch < $min
521 499 275 if defined $max and $batch > $max
528 741 33 @chunk ? :
539 204 22 @chunk ? :
548 955 49055 unless (@queue)
549 945 10 if (my(undef, $chunk) = &$code()) { }
573 27 0 'HASH' eq ref $_[0] ? :
575 0 27 unless @_ == 2
578 0 27 if @bad_opt
582 0 27 unless 'CODE' eq ref $worker
587 26 1 if ($options{'onerror'} =~ /^(die|warn)$/)
591 0 27 unless 'CODE' eq ref $options{'onerror'}
594 3 24 if ($options{'workers'} > 0 and $DEFAULTS{'workers'} == 0)
595 0 3 unless $options{'nowarn'}
600 9 18 $options{'workers'} == 0 ? :
602 10 17 if ($options{'batch'} > 1 or $options{'adaptive'}) { }
638 17 0 wantarray ? :
662 1 0 wantarray ? :