Branch Coverage

blib/lib/Net/Ident.pm
Criterion Covered Total %
branch 18 170 10.5


line true false branch
68 1 0 unless (ref $fh)
69 1 0 if $Net::Ident::DEBUG
72 1 0 unless ($fh =~ /'|::/)
73 1 0 if $Net::Ident::DEBUG
77 1 0 if $Net::Ident::DEBUG
83 1 0 if $Net::Ident::DEBUG
85 1 0 if $Net::Ident::DEBUG
102 1 0 defined $timeout ? :
1 0 if $Net::Ident::DEBUG > 1
107 0 1 unless defined $fh
114 1 0 unless $localaddr = getsockname $fh
117 0 0 unless $remoteaddr = getpeername $fh
119 1 0 if ($@ =~ /^= (.*)/) { }
0 0 elsif ($@) { }
130 1 0 if $Net::Ident::DEBUG
151 0 0 defined $timeout ? :
0 0 if $Net::Ident::DEBUG > 1
166 0 0 defined $timeout ? :
175 0 0 unless socket $$self{'fh'}, 2, 1, $tcpproto
179 0 0 unless bind $$self{'fh'}, $localbind
182 0 0 if ($^O ne 'MSWin32')
183 0 0 unless fcntl $$self{'fh'}, 4, $NONBLOCK
188 0 0 unless connect $$self{'fh'}, $identbind or $!{'EINPROGRESS'}
191 0 0 if $^O eq 'MSWin32'
193 0 0 if ($@ =~ /^= (.*)/) { }
0 0 elsif ($@) { }
199 0 0 if $Net::Ident::DEBUG
229 0 0 if $Net::Ident::DEBUG > 1
232 0 0 unless $$self{'fh'}
236 0 0 unless $$self{'state'} eq 'connect'
241 0 0 if (defined $$self{'maxtime'} and ($timeout = $$self{'maxtime'} - time) < 0)
249 0 0 unless scalar select(undef, $wmask, $emask = $wmask, $timeout)
253 0 0 if vec $emask, $fileno, 1
256 0 0 unless vec $wmask, $fileno, 1
260 0 0 if (not defined $err or $! = unpack('L', $err))
269 0 0 unless syswrite($$self{'fh'}, $query, length $query) == length $query
272 0 0 if ($@ =~ /^= (.*)/) { }
0 0 elsif ($@) { }
278 0 0 if $Net::Ident::DEBUG
307 0 0 $blocking ? :
0 0 if $Net::Ident::DEBUG > 1
310 0 0 if ($$self{'state'} ne 'query') { }
0 0 elsif ($$self{'state'} eq 'ready') { }
311 0 0 unless $self->query
320 0 0 unless $$self{'fh'}
329 0 0 if (defined $$self{'maxtime'} and ($timeout = $$self{'maxtime'} - time) < 0)
335 0 0 unless $blocking
340 0 0 if (select $rmask, undef, $emask = $rmask, $timeout)
343 0 0 if vec $emask, $fileno, 1
346 0 0 if (vec $rmask, $fileno, 1)
350 0 0 unless defined sysread($$self{'fh'}, $answer, 1000)
357 0 0 unless length $$self{'answer'} <= 1000
363 0 0 if ($$self{'answer'} =~ /[\n\r]/)
365 0 0 if $Net::Ident::DEBUG
380 0 0 if ($@ =~ /^= (.*)/) { }
0 0 elsif ($@) { }
386 0 0 if $Net::Ident::DEBUG
412 0 0 if $Net::Ident::DEBUG > 1
415 0 0 wantarray ? :
0 0 unless $self->ready(1)
422 0 0 if (not defined $reply or $$self{'remoteport'} != $port1 or $$self{'localport'} != $port2)
426 0 0 if $Net::Ident::DEBUG
427 0 0 wantarray ? :
431 0 0 if ($replytype eq 'ERROR') { }
432 0 0 if $Net::Ident::DEBUG
440 0 0 unless (($opsys, $userid) = $reply =~ /\s*((?:[^\\:]+|\\.)*):(.*)$/)
444 0 0 if $Net::Ident::DEBUG
445 0 0 wantarray ? :
471 0 0 unless ($opsys =~ /,/ or $opsys eq 'OTHER')
483 0 0 if ($Net::Ident::DEBUG > 1)
485 0 0 defined $userid ? :
486 0 0 defined $opsys ? :
487 0 0 defined $error ? :
489 0 0 wantarray ? :
497 0 0 defined $timeout ? :
0 0 if $Net::Ident::DEBUG > 1
509 0 0 defined $timeout ? :
0 0 if $Net::Ident::DEBUG > 1
546 4 0 if ($fail =~ /^_export_hook_(.*)$/ and $Net::Ident::EXPORT_HOOKS{$1}) { }
553 0 3 if (@other)
564 3 0 grep(/^IO::/, @FileHandle::ISA) ? :
571 0 3 if $Net::Ident::DEBUG
581 0 0 defined $timeout ? :
0 0 if $Net::Ident::DEBUG > 1
586 0 1 if $Net::Ident::DEBUG