Branch Coverage

blib/lib/POE/Component/Client/Ping.pm
Criterion Covered Total %
branch 63 96 65.6


line true false branch
83 0 5 if @_ % 2
93 0 0 if $> and $^O ne 'VMS' and $^O ne 'cygwin' and not defined $params{'Socket'}
96 1 4 unless defined $alias and length $alias
99 3 2 unless defined $timeout and $timeout >= 0
110 5 0 unless defined $payload
112 0 5 if scalar keys %params
170 0 4 unless socket $socket, 2, 3, $protocol
183 5 4 if ($heap->{'rcvbuf'})
184 0 5 unless (setsockopt $heap->{'socket_handle'}, 1, 8, pack('I', $heap->{'rcvbuf'}))
194 3 6 if ($heap->{'parallelism'} and $heap->{'parallelism'} == -1)
196 3 0 if ($rcvbuf)
199 3 0 if ($max_parallel > 8) { }
0 0 elsif ($max_parallel < 1) { }
235 9 46 unless (scalar keys %{$$heap{'ping_by_seq'};})
236 5 4 if (defined $heap->{'socket_handle'}) { }
245 7 48 unless defined $timeout and $timeout > 0
246 0 55 unless defined $tries_left
251 55 0 unless exists $heap->{'ping_by_seq'}{$master_seq}
272 0 55 if length($msg) % 2
290 1 54 if (ref $event eq 'ARRAY') { }
302 55 0 if ($heap->{'always_decode'} or length $address != 4)
309 0 55 unless (defined $usable_address)
341 4 51 if ($tries_left and $tries_left > 1)
357 47 55 unless scalar @{$heap->{'queue'};}
359 0 55 if ($heap->{'parallelism'} and $heap->{'outstanding'} >= $heap->{'parallelism'})
372 0 55 unless exists $heap->{'pending'}{$seq}
386 1 54 if ref $event eq 'ARRAY'
389 0 55 unless (send $heap->{'socket_handle'}, $msg, 0, $socket_address)
431 4 51 if (exists $heap->{'addr_to_seq'}{$sender}{$address})
452 0 0 unless exists $heap->{'addr_to_seq'}{$sender}
455 0 0 if (defined $address) { }
473 0 47 unless exists $heap->{'socket_handle'}
475 42 5 if scalar keys %{$$heap{'ping_by_seq'};}
480 1 4 if $heap->{'keep_socket'}
497 0 51 unless $ping_info
508 11 40 unless scalar keys %{$$heap{'addr_to_seq'}{$pbs_session};}
520 0 4 unless exists $heap->{'addr_to_seq'}{$sender}
524 0 4 unless ($seq)
532 4 0 unless scalar keys %{$$heap{'addr_to_seq'}{$sender};}
549 0 0 unless exists $heap->{'addr_to_seq'}{$sender}
579 0 33 unless $from_saddr
583 0 33 unless defined $heap->{'message_length'}
609 14 19 unless $from_type == 0
614 0 19 unless $from_pid == ($$ & 65535)
619 4 15 unless exists $heap->{'ping_by_seq'}{$from_seq}
631 2 13 if ($heap->{'onereply'})
649 5 49 unless (exists $heap->{'ping_by_seq'}{$seq})
659 4 45 if ($retryinfo)