Branch Coverage

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


line true false branch
58 0 2 unless $ipc_loop
64 0 2 unless socketpair my $child, my $parent, 1, 2049, 0
79 0 9 unless defined $vpid
80 0 9 unless defined $msg
81 4 5 if $vpid == 0
82 0 9 if $DEBUG
84 0 9 if $msg eq 'close' or $msg eq 'exit'
95 0 1 unless defined $vpid
96 0 1 unless defined $msg
104 0 0 unless defined $host
105 0 0 unless defined $port
107 0 0 if ($sock) { }
108 0 0 unless &_pack_unpack($sock, %args)
113 0 0 if $DEBUG > 1
135 0 0 unless defined $host
136 0 0 unless defined $port
141 0 0 if ($rv) { }
142 0 0 unless &_pack_unpack($sock, %args)
159 0 0 if (my $pack = $args{'pack'} and my $unpack = $args{'unpack'}) { }
0 0 elsif ($args{'pack'} or $args{'unpack'}) { }
162 0 0 if (ref $r eq 'HASH' and ref $r->{'a'} eq 'ARRAY' and $r->{'a'}[0] and $r->{'a'}[0] eq 'b') { }
170 0 0 if (not $r or $@)
187 0 3 if $DEBUG > 1
196 0 2 unless defined $kid_pid
198 1 1 if ($kid_pid) { }
202 0 1 if $_->[2] ne $parent
271 2 0 unless ($ipc_loop)
282 0 1 unless defined $waited_vpid
283 0 1 unless defined $waited_msg
284 0 1 if $waited_vpid == 0
287 0 0 if ($from eq $waited_vpid and $msg eq $waited_msg)
289 0 0 wantarray ? :
292 0 1 if $DEBUG
297 0 1 wantarray ? :
304 9 17 defined $to_vpid ? :
305 10 15 if (@{$snd{$to};})
307 2 8 unless ($fh)
308 2 0 if (@spawn) { }
309 0 2 unless defined $to_vpid
312 0 0 if ($self_parent_fh) { }
313 0 0 if ($self_parent_closed) { }
324 8 0 unless (exists $w_bufs{$fh})
326 0 8 if (my $pack = $pack{$fh}) { }
333 0 8 if $DEBUG
347 0 9 if $DEBUG > 1
350 8 1 if ($len) { }
1 0 elsif (defined $len) { }
354 8 0 if (length $buf >= 4)
356 8 0 if (length $buf >= $packet_length)
359 0 8 if $DEBUG
362 0 8 if (my $unpack = $unpack{$fh}) { }
368 0 8 if ($node{$fh})
373 0 8 if $DEBUG
374 8 0 if ($to == $self_vpid) { }
0 0 elsif ($vpid2fh{$to}) { }
375 0 8 if $DEBUG
376 1 7 if (defined $waited_vpid and defined $waited_msg) { }
379 7 0 if ($msg{$msg}) { }
382 0 0 if $DEBUG
386 0 0 if $DEBUG
393 0 8 if $r_bufs{$fh}
398 0 1 if (exists $fh2ww{$fh})
410 0 1 if (my $node_vpid = $node{$fh}) { }
412 0 0 if ($msg{'NODE_CLOSED'})
413 0 0 $fh->connected ? :
0 0 unless $closed{$vpid}
417 0 1 if ($msg{'SPAWN_CLOSED'})
418 0 0 unless $closed{$vpid}
424 1 0 if ($self_parent_fh and $self_parent_fh eq $fh)
426 1 0 unless (defined $waited_vpid and defined $waited_msg)
427 1 0 unless (@rcv)
433 0 0 if $DEBUG
436 1 7 if (defined $waited_vpid and defined $waited_msg) { }
439 1 0 if ($msg eq $waited_msg and $from eq $waited_vpid)
441 0 1 if $DEBUG
447 0 0 unless (exists $vpid2fh{$waited_vpid})
454 7 0 unless $closed{$from}
466 0 8 if $DEBUG > 1
467 0 8 unless $fh2fh{$fh}
471 8 0 if ($len) { }
473 0 8 if (length $buf) { }
481 0 0 if $DEBUG