Condition Coverage

blib/lib/IO/Socket/DNS.pm
Criterion Covered Total %
condition 0 41 0.0


and 3 conditions

line !l l&&!r l&&r condition
202 0 0 0 defined $timeout and not $timeout
212 0 0 0 $txt =~ /^(\d+)\.(.+)$/ and $1 == length $2
256 0 0 0 not $$self{'PeerPort'} and $$self{'PeerAddr'} =~ s/:(\d+)$//
389 0 0 0 defined $buffer and length $buffer
411 0 0 0 $$self{'seqid'} and length $$self{'Buffer_W'}

or 2 conditions

line l !l condition
41 0 0 $ENV{'DNS_SUFFIX'} || ''
60 0 0 $nameservers ||= ['']
344 0 0 $offset ||= 0
375 0 0 $/ || "\n"

or 3 conditions

line l !l&&r !l&&!r condition
41 0 0 0 $$self{'Suffix'} ||= $ENV{'DNS_SUFFIX'} || ''
54 0 0 0 $$self{'resolver_txt'} ||= eval { do { require Net::DNS::Resolver } } ? sub { my $name = shift(); return eval { do { [$self->resolver->query($name, 'TXT')->answer]->[0]->txtdata } }; } : do { my(%args) = $self->resolver_args; my $nameservers = $args{'nameservers'}; if ($nameservers) { $nameservers = [split(/ /, $nameservers, 0)] unless ref $nameservers; } ; $nameservers ||= ['']; warn "WARNING: Unable to find Net::DNS so reverting to nslookup (slow spawn) method ...\n"; sub { my $name = shift(); $name =~ s/\.*$/./; foreach my $server (@$nameservers) { if (`nslookup -type=TXT $name $server 2>&1` =~ /"(.+)"/) { return $1; } ; } ; return undef; } }
109 0 0 0 ($$self{'net_dns'} ||= eval { do { require Net::DNS::Resolver; return 'Net::DNS::Resolver'->new($self->resolver_args) } } || eval { do { my $suffix = $self->suffix; my $try = `nslookup -type=TXT nslookup.$suffix 2>&1`; if ($try =~ /"(.+)"/) { my $shell = $1; $shell =~ s/\bperl\b/$^X/g; system $shell; warn "Reloading Net::DNS ...\n"; delete $INC{'Net/DNS.pm'}; delete $INC{'Net/DNS/Resolver.pm'}; require Net::DNS::Resolver; return $self->resolver; } ; return undef } }) || do { warn "Unable to obtain resolver. Please pass in your own net_dns setting: $@"; exit 1 }
177 0 0 0 not defined $try_until or time <= $try_until
254 0 0 0 $$self{'PeerAddr'} ||= $$self{'PeerHost'}
263 0 0 0 $ENV{'DNS_PASSWORD'} || $$self{'Password'}