Branch Coverage

blib/lib/MCE/Flow.pm
Criterion Covered Total %
branch 107 182 58.7


line true false branch
28 0 0 if $INC{'threads.pm'}
50 46 0 unless ($_pkg =~ /^MCE::/)
61 0 0 if $_arg eq "max_workers"
62 0 0 if $_arg eq "chunk_size"
63 0 0 if $_arg eq "tmp_dir"
64 0 0 if $_arg eq "freeze"
65 0 0 if $_arg eq "thaw"
66 0 0 if $_arg eq "init_relay"
67 0 0 if $_arg eq "use_threads"
70 0 0 if ($_arg eq "sereal")
71 0 0 if (shift() eq 0)
86 0 46 unless $_p->{'CHUNK_SIZE'} eq "auto"
100 0 0 if (defined $_pkg and $_id eq "${$}.$_tid")
110 23 6 if defined $_[0] and $_[0] eq "MCE::Flow"
113 0 29 ref $_[0] eq 'HASH' ? :
118 0 29 defined wantarray ? :
124 115 0 if defined $_[0] and $_[0] eq "MCE::Flow"
125 79 36 defined $_[0] ? :
127 46 69 if ($_pkg eq 'MCE') { }
36 33 elsif ($_MCE->{$_pkg} and $_MCE->{$_pkg}{'_init_pid'} eq "${$}.$_tid") { }
131 36 0 if $_MCE->{$_pkg}{'_spawned'}
154 0 4 if defined $_[0] and $_[0] eq "MCE::Flow"
156 4 0 ref $_[0] eq 'HASH' ? :
159 4 0 if (defined(my $_p = $_params->{$_pid})) { }
160 0 4 if exists $_p->{'input_data'}
161 0 4 if exists $_p->{'sequence'}
169 2 4 if ($_r eq "" or $_r eq "SCALAR" or $_r =~ /^(?:GLOB|FileHandle|IO::)/)
175 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::)/) { }
176 0 2 unless -e $_file
177 0 2 unless -r $_file
178 0 2 unless -f $_file
188 4 0 if (defined $_pos)
203 0 2 if defined $_[0] and $_[0] eq "MCE::Flow"
205 2 0 ref $_[0] eq 'HASH' ? :
208 2 0 if (defined(my $_p = $_params->{$_pid})) { }
209 0 2 if exists $_p->{'sequence'}
210 0 2 if exists $_p->{'input_data'}
211 0 2 if exists $_p->{'_file'}
220 0 2 if ($_r eq "" or $_r =~ /^Math::/ or $_r eq "HASH" or $_r eq "ARRAY")
223 2 0 if ($_r eq '' or $_r =~ /^Math::/) { }
0 0 elsif ($_r eq 'HASH') { }
0 0 elsif ($_r eq 'ARRAY') { }
243 0 2 unless exists $_params->{$_pid}{'sequence'}
244 0 2 unless defined $_begin
246 0 2 unless defined $_end
251 2 0 if (defined $_pos)
266 0 79 if defined $_[0] and $_[0] eq "MCE::Flow"
268 6 73 caller() eq 'MCE::Flow' ? :
271 53 26 if (ref $_[0] eq "HASH")
272 14 39 unless defined $_params->{$_pid}
287 99 0 if (defined(my $_p = $_params->{$_pid}))
289 28 71 ref $_p->{'task_name'} eq 'ARRAY' ? :
291 0 99 ref $_p->{'use_threads'} eq 'ARRAY' ? :
293 40 59 ref $_p->{'max_workers'} eq 'ARRAY' ? :
298 81 18 if not defined $_prev_c->{$_pid}[$_pos] or $_prev_c->{$_pid}[$_pos] != $_code[$_pos]
301 12 87 if $_prev_n->{$_pid}[$_pos] ne $_name[$_pos]
302 0 99 if $_prev_t->{$_pid}[$_pos] ne $_thrs[$_pos]
303 24 75 if $_prev_w->{$_pid}[$_pos] ne $_wrks[$_pos]
313 0 79 if (defined $_prev_c->{$_pid}[$_pos])
322 0 79 unless scalar @_code
329 4 75 if (@_ == 1 and $_r =~ /^(?:ARRAY|HASH|SCALAR|GLOB|FileHandle|IO::|Iterator::)/)
333 79 0 if (defined(my $_p = $_params->{$_pid}))
335 59 20 if exists $_p->{'max_workers'} and ref $_p->{'max_workers'} ne "ARRAY"
337 10 69 if defined $_input_data or scalar @_
338 0 79 if exists $_p->{'user_func'}
339 0 79 if exists $_p->{'user_tasks'}
342 20 59 if (@_code > 1 and $_max_workers > 1)
351 79 0 if (defined(my $_p = $_params->{$_pid}))
352 4 75 if (exists $_p->{'_file'}) { }
355 0 75 if exists $_p->{'input_data'}
363 69 10 if ($_init_mce) { }
364 0 69 if defined $_MCE->{$_pid}
376 69 0 if (defined(my $_p = $_params->{$_pid}))
380 12 112 if $_ eq "max_workers" and ref $_p->{'max_workers'} eq "ARRAY"
381 6 106 if $_ eq "task_name" and ref $_p->{'task_name'} eq "ARRAY"
382 0 106 if $_ eq "use_threads" and ref $_p->{'use_threads'} eq "ARRAY"
384 0 106 if $_ eq "chunk_size"
385 0 106 if $_ eq "input_data"
386 0 106 if $_ eq "sequence_run"
389 0 106 unless exists $MCE::_valid_fields_new{$_}
397 0 345 if exists $_def->{$_pkg}{uc $_k} and not exists $_opts{$_k}
405 10 0 if (defined(my $_p = $_params->{$_pid}))
411 10 150 if exists $_p->{$_k}
418 31 48 if defined $_wa
420 8 71 if (defined $_input_data) { }
6 65 elsif (scalar @_) { }
430 2 63 if (defined $_params->{$_pid} and exists $_params->{$_pid}{'sequence'}) { }
435 2 0 if (exists $_params->{$_pid}{'sequence_run'})
448 18 28 if defined $_wa
450 18 28 defined $_wa ? :