Branch Coverage

blib/lib/Net/Ident.pm
Criterion Covered Total %
branch 110 172 63.9


line true false branch
65 2 9 unless (ref $fh)
66 0 2 if $DEBUG
69 1 1 unless ($fh =~ /'|::/)
70 0 1 if $DEBUG
74 0 1 if $DEBUG
80 0 1 if $DEBUG
82 0 1 if $DEBUG
99 1 0 defined $timeout ? :
1 12 if $DEBUG > 1
104 2 11 unless defined $fh
111 6 5 unless $localaddr = getsockname $fh
114 1 4 unless $remoteaddr = getpeername $fh
116 9 4 if ($@ =~ /^= (.*)/) { }
0 4 elsif ($@) { }
127 1 8 if $DEBUG
148 0 0 defined $timeout ? :
0 9 if $DEBUG > 1
163 8 1 defined $timeout ? :
172 0 9 unless socket $self->{'fh'}, 2, 1, $tcpproto
176 1 8 unless bind $self->{'fh'}, $localbind
179 8 0 if ($^O ne "MSWin32")
180 0 8 unless $self->{'fh'}->blocking(0)
187 2 6 unless connect $self->{'fh'}, $identbind or $!{'EINPROGRESS'}
188 0 6 if $^O eq "MSWin32"
190 3 6 if ($@ =~ /^= (.*)/) { }
0 6 elsif ($@) { }
196 0 3 if $DEBUG
214 3 6 $self->{'error'} ? :
226 0 54 if $DEBUG > 1
229 14 40 unless $self->{'fh'}
233 5 35 unless $self->{'state'} eq "connect"
238 2 33 if (defined $self->{'maxtime'} and ($timeout = $self->{'maxtime'} - time) < 0)
246 0 33 unless scalar select(undef, $wmask, undef, $timeout)
250 0 33 unless vec $wmask, $fileno, 1
254 6 27 if (not defined $err or $! = unpack("L", $err))
263 0 27 unless syswrite($self->{'fh'}, $query, length $query) == length $query
266 13 27 if ($@ =~ /^= (.*)/) { }
0 27 elsif ($@) { }
272 0 13 if $DEBUG
301 0 0 $blocking ? :
0 60 if $DEBUG > 1
304 7 53 if ($self->{'state'} eq "ready")
309 15 38 if ($self->{'state'} ne "query")
310 13 2 unless $self->query
314 0 40 unless $self->{'fh'}
323 6 50 if (defined $self->{'maxtime'} and ($timeout = $self->{'maxtime'} - time) < 0)
329 18 32 unless $blocking
334 34 16 if (select $rmask, undef, undef, $timeout)
337 34 0 if (vec $rmask, $fileno, 1)
342 0 34 unless (defined $nread)
348 0 0 if $!{'ESPIPE'} or $!{'ECONNRESET'}
352 4 30 unless $nread
358 1 29 unless length $self->{'answer'} <= 1000
364 22 7 if ($self->{'answer'} =~ /[\n\r]/)
366 0 22 if $DEBUG
381 11 29 if ($@ =~ /^= (.*)/) { }
0 29 elsif ($@) { }
387 0 11 if $DEBUG
413 0 40 if $DEBUG > 1
416 7 6 wantarray ? :
13 27 unless $self->ready(1)
423 2 23 if (not defined $reply or $self->{'remoteport'} != $port1 or $self->{'localport'} != $port2)
427 0 4 if $DEBUG
428 4 0 wantarray ? :
432 10 13 if ($replytype eq 'ERROR') { }
433 0 10 if $DEBUG
441 0 13 unless (($opsys, $userid) = $reply =~ /\s*((?:[^\\:]+|\\.)*):(.*)$/)
445 0 0 if $DEBUG
446 0 0 wantarray ? :
472 11 2 unless ($opsys =~ /,/ or $opsys eq "OTHER")
484 0 23 if ($DEBUG > 1)
486 0 0 defined $userid ? :
487 0 0 defined $opsys ? :
488 0 0 defined $error ? :
490 20 3 wantarray ? :
498 0 0 defined $timeout ? :
0 4 if $DEBUG > 1
510 0 0 defined $timeout ? :
0 3 if $DEBUG > 1
547 7 2 if ($fail =~ /^_export_hook_(.*)$/ and $EXPORT_HOOKS{$1}) { }
554 2 5 if (@other)
565 5 0 grep(/^IO::/, @FileHandle::ISA) ? :
572 0 5 if $DEBUG
582 0 0 defined $timeout ? :
0 0 if $DEBUG > 1
587 0 2 if $DEBUG