Branch Coverage

blib/lib/Net/IPMessenger.pm
Criterion Covered Total %
branch 30 76 39.4


line true false branch
44 3 0 if $args{'NickName'}
45 0 3 if $args{'GroupName'}
46 3 0 if $args{'UserName'}
47 3 0 if $args{'HostName'}
48 0 3 if $args{'ServerAddr'}
49 0 3 if $args{'Debug'}
50 0 3 if $args{'BroadCast'}
56 0 3 if $encrypt
58 1 2 unless my $sock = 'IO::Socket::INET'->new('Proto', $PROTO, 'LocalPort', $args{'Port'} || $PORT)
88 0 4 unless $sock->recv($msg, $MAX_SOCKBUF)
92 0 4 if ($self->serveraddr)
93 0 0 if $peeraddr eq $self->serveraddr
107 4 0 if (ref $ev_handler and ref $ev_handler eq 'ARRAY')
109 0 4 if ($self->debug and $handler->can('debug'))
112 3 1 if $handler->can($modename)
125 0 4 if (exists $self->user->{$key}) { }
132 4 0 unless ($modename eq 'SENDMSG' and $command->get_noaddlist)
150 0 0 if (defined $self->user->{$key}->listaddr and $listaddr eq $self->user->{$key}->listaddr)
158 0 0 unless my $uname = shift @list
159 0 0 unless my $host = shift @list
160 0 0 unless my $pnum = shift @list
161 0 0 unless my $addr = shift @list
162 0 0 unless my $com = shift @list
163 0 0 unless my $nick = shift @list
164 0 0 unless my $group = shift @list
166 0 0 if ($self->serveraddr)
167 0 0 if $addr eq $self->serveraddr
189 0 0 unless (exists $new{$pkey})
219 1 0 if ($command->modename eq 'SENDMSG' and $command->get_sendcheck and not exists $self->sending_packet->{$packet_num})
228 2 2 unless (defined $peerport)
233 1 3 if ($command->get_broadcast) { }
234 0 1 unless $sock->sockopt(6, 1)
237 1 0 unless (@{$self->broadcast;})
242 0 1 unless $sock->send($msg, 0, $dest)
246 0 1 unless $sock->sockopt(6, 0)
252 2 1 unless (defined $peeraddr)
257 0 3 unless $sock->send($msg, 0, $dest)
267 0 0 if (0 > --$$args{'sendretry'})