Branch Coverage

blib/lib/MCE/Step.pm
Criterion Covered Total %
branch 117 242 48.3


line true false branch
30 0 0 if $INC{'threads.pm'}
52 12 0 unless ($_pkg =~ /^MCE::/)
63 0 0 if $_arg eq "max_workers"
64 0 0 if $_arg eq "chunk_size"
65 0 0 if $_arg eq "tmp_dir"
66 0 0 if $_arg eq "freeze"
67 0 0 if $_arg eq "thaw"
68 0 0 if $_arg eq "init_relay"
69 0 0 if $_arg eq "use_threads"
71 0 0 if $_arg eq "fast"
74 0 0 if ($_arg eq "sereal")
75 0 0 if (shift() eq 0)
90 0 12 unless $_p->{'CHUNK_SIZE'} eq "auto"
106 10 12 if (defined $_mce->{'user_tasks'}[$_task_id + 1])
112 0 22 if exists $_params->{'task_end'} and ref $_params->{'task_end'} eq "CODE"
128 0 21 ref $x ? :
132 0 21 unless $self->{'_wid'}
136 21 0 if ($_task_id < $_last_task_id->{$_pid}) { }
150 0 0 ref $x ? :
155 0 0 unless $self->{'_wid'}
157 0 0 unless defined $_name and exists $_lkup->{$_pid}{$_name}
159 0 0 if $_lkup->{$_pid}{$_name} <= $self->{'_task_id'}
163 0 0 if ($_task_id < $_last_task_id->{$_pid}) { }
164 0 0 if (scalar @_ > 1) { }
183 0 0 ref $x ? :
188 0 0 unless $self->{'_wid'}
190 0 0 unless defined $_name and exists $_lkup->{$_pid}{$_name}
192 0 0 if $_lkup->{$_pid}{$_name} <= $self->{'_task_id'}
193 0 0 if not &looks_like_number($_p) or int $_p != $_p
198 0 0 if ($_task_id < $_last_task_id->{$_pid}) { }
199 0 0 if (scalar @_ > 1) { }
218 0 0 ref $x ? :
223 0 0 unless $self->{'_wid'}
225 0 0 unless defined $_name and exists $_lkup->{$_pid}{$_name}
227 0 0 if $_lkup->{$_pid}{$_name} <= $self->{'_task_id'}
231 0 0 if not &looks_like_number($_t) or int $_t != $_t
234 0 0 if ($_task_id < $_last_task_id->{$_pid}) { }
254 0 0 if (defined $_pkg and $_id eq "${$}.$_tid")
264 13 0 if defined $_[0] and $_[0] eq "MCE::Step"
267 0 13 ref $_[0] eq 'HASH' ? :
272 0 13 defined wantarray ? :
278 25 0 if defined $_[0] and $_[0] eq "MCE::Step"
279 21 4 defined $_[0] ? :
281 12 13 if ($_pkg eq 'MCE') { }
4 9 elsif ($_MCE->{$_pkg} and $_MCE->{$_pkg}{'_init_pid'} eq "${$}.$_tid") { }
285 4 0 if $_MCE->{$_pkg}{'_spawned'}
297 4 0 if (defined $_queue->{$_pkg})
317 0 4 if defined $_[0] and $_[0] eq "MCE::Step"
319 4 0 ref $_[0] eq 'HASH' ? :
322 4 0 if (defined(my $_p = $_params->{$_pid})) { }
323 0 4 if exists $_p->{'input_data'}
324 0 4 if exists $_p->{'sequence'}
332 2 4 if ($_r eq "" or $_r eq "SCALAR" or $_r =~ /^(?:GLOB|FileHandle|IO::)/)
338 2 2 if (defined $_file and ref $_file eq '' and $_file ne '') { }
2 0 elsif (ref $_file eq 'SCALAR' or ref($_file) =~ /^(?:GLOB|FileHandle|IO::)/) { }
339 0 2 unless -e $_file
340 0 2 unless -r $_file
341 0 2 unless -f $_file
351 4 0 if (defined $_pos)
366 0 2 if defined $_[0] and $_[0] eq "MCE::Step"
368 2 0 ref $_[0] eq 'HASH' ? :
371 2 0 if (defined(my $_p = $_params->{$_pid})) { }
372 0 2 if exists $_p->{'sequence'}
373 0 2 if exists $_p->{'input_data'}
374 0 2 if exists $_p->{'_file'}
383 0 2 if ($_r eq "" or $_r =~ /^Math::/ or $_r eq "HASH" or $_r eq "ARRAY")
386 2 0 if ($_r eq '' or $_r =~ /^Math::/) { }
0 0 elsif ($_r eq 'HASH') { }
0 0 elsif ($_r eq 'ARRAY') { }
406 0 2 unless exists $_params->{$_pid}{'sequence'}
407 0 2 unless defined $_begin
409 0 2 unless defined $_end
414 2 0 if (defined $_pos)
429 0 21 if defined $_[0] and $_[0] eq "MCE::Step"
431 6 15 caller() eq 'MCE::Step' ? :
434 14 7 if (ref $_[0] eq "HASH")
435 0 14 unless defined $_params->{$_pid}
452 35 0 if (defined(my $_p = $_params->{$_pid}))
454 28 7 ref $_p->{'task_name'} eq 'ARRAY' ? :
456 0 35 ref $_p->{'use_threads'} eq 'ARRAY' ? :
458 28 7 ref $_p->{'max_workers'} eq 'ARRAY' ? :
461 28 7 if defined $_name[$_pos]
465 19 16 if not defined $_prev_c->{$_pid}[$_pos] or $_prev_c->{$_pid}[$_pos] != $_code[$_pos]
468 12 23 if $_prev_n->{$_pid}[$_pos] ne $_name[$_pos]
469 0 35 if $_prev_t->{$_pid}[$_pos] ne $_thrs[$_pos]
470 12 23 if $_prev_w->{$_pid}[$_pos] ne $_wrks[$_pos]
480 0 21 if (defined $_prev_c->{$_pid}[$_pos])
489 0 21 unless scalar @_code
496 4 17 if (@_ == 1 and $_r =~ /^(?:ARRAY|HASH|SCALAR|GLOB|FileHandle|IO::|Iterator::)/)
500 21 0 if (defined(my $_p = $_params->{$_pid}))
502 7 14 if exists $_p->{'max_workers'} and ref $_p->{'max_workers'} ne "ARRAY"
504 10 11 if defined $_input_data or scalar @_
505 0 21 if exists $_p->{'user_func'}
506 0 21 if exists $_p->{'user_tasks'}
509 14 7 if (@_code > 1 and $_max_workers > 1)
518 21 0 if (defined(my $_p = $_params->{$_pid}))
519 4 17 if (exists $_p->{'_file'}) { }
522 0 17 if exists $_p->{'input_data'}
530 13 8 if ($_init_mce or not exists $_queue->{$_pid}) { }
531 0 13 if defined $_MCE->{$_pid}
532 13 0 unless defined $_queue->{$_pid}
552 13 0 if (defined(my $_p = $_params->{$_pid}))
556 6 19 if $_ eq "max_workers" and ref $_p->{'max_workers'} eq "ARRAY"
557 6 13 if $_ eq "task_name" and ref $_p->{'task_name'} eq "ARRAY"
558 0 13 if $_ eq "use_threads" and ref $_p->{'use_threads'} eq "ARRAY"
560 0 13 if $_ eq "chunk_size"
561 0 13 if $_ eq "input_data"
562 0 13 if $_ eq "sequence_run"
563 0 13 if $_ eq "task_end"
566 0 13 unless exists $MCE::_valid_fields_new{$_}
574 0 65 if exists $_def->{$_pkg}{uc $_k} and not exists $_opts{$_k}
582 8 0 if (defined(my $_p = $_params->{$_pid}))
588 8 120 if exists $_p->{$_k}
595 7 14 if defined $_wa
597 8 13 if (defined $_input_data) { }
6 7 elsif (scalar @_) { }
607 2 5 if (defined $_params->{$_pid} and exists $_params->{$_pid}{'sequence'}) { }
612 2 0 if (exists $_params->{$_pid}{'sequence_run'})
626 0 12 unless ($_MCE->{$_pid}{'_spawned'})
631 2 10 if defined $_wa
633 2 10 defined $_wa ? :