Branch Coverage

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


line true false branch
57 0 2 unless $ipc_loop
63 0 2 unless socketpair my $child, my $parent, 1, 2049, 0
78 0 9 unless defined $vpid
79 0 9 unless defined $msg
80 4 5 if $vpid == 0
81 0 9 if $DEBUG
83 0 9 if $msg eq 'close' or $msg eq 'exit'
94 0 1 unless defined $vpid
95 0 1 unless defined $msg
103 0 0 unless defined $host
104 0 0 unless defined $port
106 0 0 if ($sock) { }
107 0 0 unless &_pack_unpack($sock, %args)
112 0 0 if $DEBUG > 1
134 0 0 unless defined $host
135 0 0 unless defined $port
140 0 0 if ($rv) { }
141 0 0 unless &_pack_unpack($sock, %args)
158 0 0 if (my $pack = $args{'pack'} and my $unpack = $args{'unpack'}) { }
0 0 elsif ($args{'pack'} or $args{'unpack'}) { }
161 0 0 if (ref $r eq 'HASH' and ref $r->{'a'} eq 'ARRAY' and $r->{'a'}[0] and $r->{'a'}[0] eq 'b') { }
169 0 0 if (not $r or $@)
186 0 3 if $DEBUG > 1
195 0 2 unless defined $kid_pid
197 1 1 if ($kid_pid) { }
201 0 1 if $_->[2] ne $parent
269 2 0 unless ($ipc_loop)
280 0 1 unless defined $waited_vpid
281 0 1 unless defined $waited_msg
282 0 1 if $waited_vpid == 0
285 0 0 if ($from eq $waited_vpid and $msg eq $waited_msg)
287 0 0 wantarray ? :
290 0 1 if $DEBUG
295 0 1 wantarray ? :
302 9 17 defined $to_vpid ? :
303 10 15 if (@{$snd{$to};})
305 2 8 unless ($fh)
306 2 0 if (@spawn) { }
307 0 2 unless defined $to_vpid
310 0 0 if ($self_parent_fh) { }
311 0 0 if ($self_parent_closed) { }
322 8 0 unless (exists $w_bufs{$fh})
324 0 8 if (my $pack = $pack{$fh}) { }
331 0 8 if $DEBUG
345 0 9 if $DEBUG > 1
348 8 1 if ($len) { }
1 0 elsif (defined $len) { }
352 8 0 if (length $buf >= 4)
354 8 0 if (length $buf >= $packet_length)
357 0 8 if $DEBUG
360 0 8 if (my $unpack = $unpack{$fh}) { }
366 0 8 if ($node{$fh})
371 0 8 if $DEBUG
372 8 0 if ($to == $self_vpid) { }
0 0 elsif ($vpid2fh{$to}) { }
373 0 8 if $DEBUG
374 1 7 if (defined $waited_vpid and defined $waited_msg) { }
377 7 0 if ($msg{$msg}) { }
380 0 0 if $DEBUG
384 0 0 if $DEBUG
391 0 8 if $r_bufs{$fh}
396 0 1 if (exists $fh2ww{$fh})
409 0 1 if (my $node_vpid = $node{$fh}) { }
411 0 0 if ($msg{'NODE_CLOSED'})
412 0 0 $fh->connected ? :
0 0 unless $closed{$vpid}
416 0 1 if ($msg{'SPAWN_CLOSED'})
417 0 0 unless $closed{$vpid}
423 1 0 if ($self_parent_fh and $self_parent_fh eq $fh)
425 1 0 unless (defined $waited_vpid and defined $waited_msg)
426 1 0 unless (@rcv)
432 0 0 if $DEBUG
435 1 7 if (defined $waited_vpid and defined $waited_msg) { }
438 1 0 if ($msg eq $waited_msg and $from eq $waited_vpid)
440 0 1 if $DEBUG
446 0 0 unless (exists $vpid2fh{$waited_vpid})
453 7 0 unless $closed{$from}
465 0 8 if $DEBUG > 1
466 0 8 unless $fh2fh{$fh}
470 8 0 if ($len) { }
472 0 8 if (length $buf) { }
481 0 0 if $DEBUG