Branch Coverage

blib/lib/MCE/Shared/Queue.pm
Criterion Covered Total %
branch 38 288 13.1


line true false branch
54 0 0 if $INC{'threads.pm'}
59 0 26 $_tid ? :
63 26 0 if ($_Q->{'_init_pid'} eq $_pid)
84 0 36 unless exists $_valid_fields_new{$_p}
94 0 26 defined $_argv{'await'} ? :
95 10 16 defined $_argv{'porder'} ? :
96 26 0 defined $_argv{'type'} ? :
98 0 26 if (exists $_argv{'queue'}) { }
100 0 0 if ref $_argv{'queue'} ne "ARRAY"
110 0 26 $_tid ? :
114 0 26 if $_Q->{'_await'}
117 8 0 if $_reset_flg and $INC{'MCE/Shared/Server.pm'}
152 0 0 unless (exists $_Q->{'_ended'})
165 0 0 unless scalar @_
167 0 0 if (exists $_Q->{'_ended'})
172 0 0 if ($_Q->{'_dsem'})
175 0 0 unless $_Q->{'_dsem'}
189 0 0 if not &looks_like_number($_p) or int $_p != $_p
192 0 0 unless scalar @_
194 0 0 if (exists $_Q->{'_ended'})
199 0 0 if ($_Q->{'_dsem'})
202 0 0 unless $_Q->{'_dsem'}
218 0 0 if (defined $_cnt and $_cnt ne '1') { }
219 0 0 if not &looks_like_number($_cnt) or int $_cnt != $_cnt or $_cnt < 1
224 0 0 if ($_pending < $_cnt and scalar @{$_Q->{'_heap'};})
229 0 0 if $_pending < $_cnt
234 0 0 @{$_Q->{'_datq'};} || @{$_Q->{'_heap'};} ? :
238 0 0 if scalar @_items
239 0 0 if $_has_data
240 0 0 if exists $_Q->{'_ended'}
253 0 0 if (defined $_cnt and $_cnt ne 1)
254 0 0 if not &looks_like_number($_cnt) or int $_cnt != $_cnt or $_cnt < 1
259 0 0 if ($_pending < $_cnt and scalar @{$_Q->{'_heap'};})
265 0 0 if $_pending < $_cnt
272 0 0 defined $_buf ? :
281 0 0 if (defined $_timeout)
282 0 0 unless &looks_like_number($_timeout)
286 0 0 if (defined $_cnt and $_cnt ne 1)
287 0 0 if not &looks_like_number($_cnt) or int $_cnt != $_cnt or $_cnt < 1
292 0 0 if ($_pending < $_cnt and scalar @{$_Q->{'_heap'};})
298 0 0 if $_pending < $_cnt
305 0 0 defined $_buf ? :
314 0 0 if (scalar @{$_Q->{'_heap'};})
321 0 0 $_pending ? :
0 0 exists $_Q->{'_ended'} ? :
330 0 0 if not &looks_like_number($_i) or int $_i != $_i
333 0 0 unless scalar @_
335 0 0 if (exists $_Q->{'_ended'})
340 0 0 if ($_Q->{'_dsem'})
343 0 0 unless $_Q->{'_dsem'}
347 0 0 if (abs $_i > scalar @{$_Q->{'_datq'};}) { }
348 0 0 if ($_i >= 0) { }
349 0 0 if ($_Q->{'_type'}) { }
356 0 0 if ($_Q->{'_type'}) { }
364 0 0 unless ($_Q->{'_type'})
366 0 0 $_i >= 0 ? :
380 0 0 if not &looks_like_number($_p) or int $_p != $_p
382 0 0 if not &looks_like_number($_i) or int $_i != $_i
385 0 0 unless scalar @_
387 0 0 if (exists $_Q->{'_ended'})
392 0 0 if ($_Q->{'_dsem'})
395 0 0 unless $_Q->{'_dsem'}
399 0 0 if (exists $_Q->{'_datp'}{$_p} and scalar @{$_Q->{'_datp'}{$_p};}) { }
401 0 0 if (abs $_i > scalar @{$_Q->{'_datp'}{$_p};}) { }
402 0 0 if ($_i >= 0) { }
403 0 0 if ($_Q->{'_type'}) { }
410 0 0 if ($_Q->{'_type'}) { }
418 0 0 unless ($_Q->{'_type'})
420 0 0 $_i >= 0 ? :
439 0 0 if ($_i) { }
440 0 0 if not &looks_like_number($_i) or int $_i != $_i
445 0 0 if abs $_i > scalar @{$_Q->{'_datq'};}
447 0 0 unless ($_Q->{'_type'})
449 0 0 $_i >= 0 ? :
462 0 0 if ($_i) { }
463 0 0 if not &looks_like_number($_i) or int $_i != $_i
468 0 0 if not &looks_like_number($_p) or int $_p != $_p
471 0 0 unless exists $_Q->{'_datp'}{$_p}
472 0 0 if abs $_i > scalar @{$_Q->{'_datp'}{$_p};}
474 0 0 unless ($_Q->{'_type'})
476 0 0 $_i >= 0 ? :
489 0 0 if ($_i) { }
490 0 0 if not &looks_like_number($_i) or int $_i != $_i
495 0 0 if abs $_i > scalar @{$_Q->{'_heap'};}
517 0 0 if (not exists $_Q->{'_datp'}{$_p} or @{$_Q->{'_datp'}{$_p};} == 0)
519 0 0 do { $_Q->{'_porder'} } ? :
0 0 scalar @{$_Q->{'_heap'};} ? :
542 0 0 unless (scalar @{$_Q->{'_heap'};})
544 0 0 $_Q->{'_type'} ? :
550 0 0 if @{$_Q->{'_datp'}{$_p};} == 1
554 0 0 $_Q->{'_type'} ? :
563 0 0 if (defined $_p)
564 0 0 if not &looks_like_number($_p) or int $_p != $_p
567 0 0 unless exists $_Q->{'_datp'}{$_p}
580 0 0 if ($_p < $_Q->{'_heap'}[0]) { }
0 0 elsif ($_p > $_Q->{'_heap'}[-1]) { }
595 0 0 if ($_p > $_Q->{'_heap'}[$_midpoint]) { }
615 0 0 if ($_p > $_Q->{'_heap'}[0]) { }
0 0 elsif ($_p < $_Q->{'_heap'}[-1]) { }
630 0 0 if ($_p < $_Q->{'_heap'}[$_midpoint]) { }
826 0 0 if exists $_function->{$key}
867 0 24 if defined $\
868 0 24 if $/ ne $LF
873 0 24 $_is_MSWin32 ? :
879 24 0 if $_[2] > 0
881 24 0 unless $_is_MSWin32
884 0 24 if $MCE::Signal::SIG
889 0 0 unless my $_Q = $_obj->{$_id}
890 0 0 unless exists $_Q->{'_qr_sock'}
895 0 0 unless exists $_Q->{'_ar_sock'}
896 0 0 if not &looks_like_number($_t) or int $_t != $_t
899 0 0 if $_t < 0
902 0 0 if $_is_MSWin32
912 0 16 unless my $_Q = $_obj->{$_id}
913 0 16 unless exists $_Q->{'_qr_sock'}
915 6 10 if (defined $_cnt and $_cnt ne '1') { }
916 0 6 if not &looks_like_number($_cnt) or int $_cnt != $_cnt or $_cnt < 1
924 10 6 if $_len > 0 and $_cnt == 1
925 6 0 if $_len > 0
926 0 0 if $_len == -2
928 0 0 if $_is_MSWin32
938 0 4 unless my $_Q = $_obj->{$_id}
939 0 4 unless exists $_Q->{'_qr_sock'}
941 0 4 if (defined $_cnt and $_cnt ne '1') { }
942 0 0 if not &looks_like_number($_cnt) or int $_cnt != $_cnt or $_cnt < 1
950 0 4 if $_len < 0
952 4 0 $_cnt == 1 ? :
960 0 4 unless my $_Q = $_obj->{$_id}
961 0 4 unless exists $_Q->{'_qr_sock'}
963 0 4 if (defined $_timeout)
964 0 0 if not &looks_like_number($_timeout) or $_timeout < 0
969 0 4 if (defined $_cnt and $_cnt ne '1') { }
970 0 0 if not &looks_like_number($_cnt) or int $_cnt != $_cnt or $_cnt < 1
976 4 0 if (not $_timeout or $_timeout < 0)
978 0 4 if $_len < 0
979 4 0 $_cnt == 1 ? :
984 0 0 if $_len > 0 and $_cnt == 1
985 0 0 if $_len > 0
986 0 0 if $_len == -2
990 0 0 if $_timeout < "0.045"
993 0 0 if (select($_r, undef, undef, $_timeout) > 0)
997 0 0 if $_len < 0
998 0 0 $_cnt == 1 ? :
1009 0 4 @_ == 1 && !wantarray ? :