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'} |