Branch Coverage

blib/lib/MCE/Loop.pm
Criterion Covered Total %
branch 69 134 51.4


line true false branch
28 0 0 if $INC{'threads.pm'}
48 5 0 unless ($_pkg =~ /^MCE::/)
59 0 0 if $_arg eq "max_workers"
60 0 0 if $_arg eq "chunk_size"
61 0 0 if $_arg eq "tmp_dir"
62 0 0 if $_arg eq "freeze"
63 0 0 if $_arg eq "thaw"
64 0 0 if $_arg eq "init_relay"
65 0 0 if $_arg eq "use_threads"
68 0 0 if ($_arg eq "sereal")
69 0 0 if (shift() eq 0)
84 0 5 unless $_p->{'CHUNK_SIZE'} eq "auto"
98 0 0 if (defined $_pkg and $_id eq "${$}.$_tid")
108 6 0 if defined $_[0] and $_[0] eq "MCE::Loop"
111 0 6 ref $_[0] eq 'HASH' ? :
116 0 6 defined wantarray ? :
122 11 0 if defined $_[0] and $_[0] eq "MCE::Loop"
123 8 3 defined $_[0] ? :
125 5 6 if ($_pkg eq 'MCE') { }
3 3 elsif ($_MCE->{$_pkg} and $_MCE->{$_pkg}{'_init_pid'} eq "${$}.$_tid") { }
129 3 0 if $_MCE->{$_pkg}{'_spawned'}
148 0 4 if defined $_[0] and $_[0] eq "MCE::Loop"
153 4 0 if (defined(my $_p = $_params->{$_pid})) { }
154 0 4 if exists $_p->{'input_data'}
155 0 4 if exists $_p->{'sequence'}
161 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::)/) { }
162 0 2 unless -e $_file
163 0 2 unless -r $_file
164 0 2 unless -f $_file
187 0 2 if defined $_[0] and $_[0] eq "MCE::Loop"
192 2 0 if (defined(my $_p = $_params->{$_pid})) { }
193 0 2 if exists $_p->{'input_data'}
194 0 2 if exists $_p->{'_file'}
202 0 2 if (ref $_[0] eq 'HASH') { }
0 2 elsif (ref $_[0] eq 'ARRAY') { }
2 0 elsif (ref $_[0] eq '' or ref($_[0]) =~ /^Math::/) { }
207 0 0 if (@{$_[0];} > 3 and $_[0][3] =~ /\d$/) { }
217 0 2 if (@_ > 3 and $_[3] =~ /\d$/) { }
230 0 2 unless defined $_begin
232 0 2 unless defined $_end
250 0 14 if defined $_[0] and $_[0] eq "MCE::Loop"
253 6 8 caller() eq 'MCE::Loop' ? :
259 4 10 if (@_ == 1 and $_r =~ /^(?:ARRAY|HASH|SCALAR|CODE|GLOB|FileHandle|IO::|Iterator::)/)
263 14 0 if (defined(my $_p = $_params->{$_pid}))
265 14 0 if exists $_p->{'max_workers'}
267 8 6 if defined $_input_data or scalar @_
268 0 14 if exists $_p->{'user_func'}
269 0 14 if exists $_p->{'user_tasks'}
277 14 0 if (defined(my $_p = $_params->{$_pid}))
278 4 10 if (exists $_p->{'_file'}) { }
281 0 10 if exists $_p->{'input_data'}
289 6 8 if (not defined $_prev_c->{$_pid} or $_prev_c->{$_pid} != $_code)
290 0 6 if defined $_MCE->{$_pid}
298 6 0 if (defined(my $_p = $_params->{$_pid}))
300 0 10 if $_k eq "sequence_run"
301 0 10 if $_k eq "input_data"
302 0 10 if $_k eq "chunk_size"
305 0 10 unless exists $MCE::_valid_fields_new{$_k}
313 0 30 if exists $_def->{$_pkg}{uc $_k} and not exists $_opts{$_k}
321 2 12 if defined $_wa
323 8 6 if (defined $_input_data) { }
4 2 elsif (scalar @_) { }
333 2 0 if (defined $_params->{$_pid} and exists $_params->{$_pid}{'sequence'})
338 2 0 if (exists $_params->{$_pid}{'sequence_run'})
348 1 10 if defined $_wa
350 1 10 defined $_wa ? :