Branch Coverage

blib/lib/IPC/MPS/Event.pm
Criterion Covered Total %
branch 63 164 38.4


line true false branch
56 0 2 unless $ipc_loop
62 0 2 unless socketpair my $child, my $parent, 1, 1, 0
77 0 9 unless defined $vpid
78 0 9 unless defined $msg
79 4 5 if $vpid == 0
80 0 9 if $DEBUG
82 0 9 if $msg eq 'close' or $msg eq 'exit'
93 0 1 unless defined $vpid
94 0 1 unless defined $msg
102 0 0 unless defined $host
103 0 0 unless defined $port
105 0 0 if ($sock) { }
106 0 0 unless &_pack_unpack($sock, %args)
111 0 0 if $DEBUG > 1
133 0 0 unless defined $host
134 0 0 unless defined $port
139 0 0 if ($rv) { }
140 0 0 unless &_pack_unpack($sock, %args)
157 0 0 if (my $pack = $args{'pack'} and my $unpack = $args{'unpack'}) { }
0 0 elsif ($args{'pack'} or $args{'unpack'}) { }
160 0 0 if (ref $r eq 'HASH' and ref $r->{'a'} eq 'ARRAY' and $r->{'a'}[0] and $r->{'a'}[0] eq 'b') { }
168 0 0 if (not $r or $@)
185 0 3 if $DEBUG > 1
194 0 2 unless defined $kid_pid
196 1 1 if ($kid_pid) { }
200 0 1 if $_->[2] ne $parent
268 2 0 unless ($ipc_loop)
279 0 1 unless defined $waited_vpid
280 0 1 unless defined $waited_msg
281 0 1 if $waited_vpid == 0
284 0 0 if ($from eq $waited_vpid and $msg eq $waited_msg)
286 0 0 wantarray ? :
289 0 1 if $DEBUG
294 0 1 wantarray ? :
301 9 17 defined $to_vpid ? :
302 10 15 if (@{$snd{$to};})
304 2 8 unless ($fh)
305 2 0 if (@spawn) { }
306 0 2 unless defined $to_vpid
309 0 0 if ($self_parent_fh) { }
310 0 0 if ($self_parent_closed) { }
321 8 0 unless (exists $w_bufs{$fh})
323 0 8 if (my $pack = $pack{$fh}) { }
330 0 8 if $DEBUG
344 0 9 if $DEBUG > 1
347 8 1 if ($len) { }
1 0 elsif (defined $len) { }
351 8 0 if (length $buf >= 4)
353 8 0 if (length $buf >= $packet_length)
356 0 8 if $DEBUG
359 0 8 if (my $unpack = $unpack{$fh}) { }
365 0 8 if ($node{$fh})
370 0 8 if $DEBUG
371 8 0 if ($to == $self_vpid) { }
0 0 elsif ($vpid2fh{$to}) { }
372 0 8 if $DEBUG
373 1 7 if (defined $waited_vpid and defined $waited_msg) { }
376 7 0 if ($msg{$msg}) { }
379 0 0 if $DEBUG
383 0 0 if $DEBUG
390 0 8 if $r_bufs{$fh}
395 0 1 if (exists $fh2ww{$fh})
408 0 1 if (my $node_vpid = $node{$fh}) { }
410 0 0 if ($msg{'NODE_CLOSED'})
411 0 0 $fh->connected ? :
0 0 unless $closed{$vpid}
415 0 1 if ($msg{'SPAWN_CLOSED'})
416 0 0 unless $closed{$vpid}
422 1 0 if ($self_parent_fh and $self_parent_fh eq $fh)
424 1 0 unless (defined $waited_vpid and defined $waited_msg)
425 1 0 unless (@rcv)
431 0 0 if $DEBUG
434 1 7 if (defined $waited_vpid and defined $waited_msg) { }
437 1 0 if ($msg eq $waited_msg and $from eq $waited_vpid)
439 0 1 if $DEBUG
445 0 0 unless (exists $vpid2fh{$waited_vpid})
452 7 0 unless $closed{$from}
464 0 8 if $DEBUG > 1
465 0 8 unless $fh2fh{$fh}
469 8 0 if ($len) { }
471 0 8 if (length $buf) { }
480 0 0 if $DEBUG