Bug#618495: libnet-nslookup-perl: lookup ptr doesn't work
Marc Haber
mh+debian-bugs at zugschlus.de
Tue Mar 15 16:54:52 UTC 2011
Package: libnet-nslookup-perl
Version: 1.19-1
Severity: normal
Hi,
perl -e 'use Net::Nslookup; print nslookup(host=>"85.214.68.41",type=>"PTR");'
returns an empty string. Pimping the _lookup_ptr function to give some
more debug output:
sub _lookup_ptr {
my ($term, $server) = @_;
my $res = ns($server);
my (@answers, $query, $rr);
debug("Performing 'PTR' lookup on `$term'");
$query = $res->search($term, "PTR") || return;
print Dumper(\$query);
print Dumper(\$query->answer);
for $rr ($query->answer) {
print Dumper(\$rr);
print Dumper(\$rr->ptrdname);
if ($rr->can('ptrdname')) {
push @answers, $rr->ptrdname;
}
}
print Dumper(\@answers);
return @answers;
}
reveals that the call to $rr->can('ptrdname') prevents the RR's answer
from being put into the answer list. Removing the if seems to fix the
issue. The other _lookup_foo functions also directly push the answer
to the array.
Greetings
Marc
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.37.2-zgsrv20080 (SMP w/1 CPU core; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages libnet-nslookup-perl depends on:
ii libnet-dns-perl 0.66-2 Perform DNS queries from a Perl sc
ii perl 5.10.1-17 Larry Wall's Practical Extraction
libnet-nslookup-perl recommends no packages.
libnet-nslookup-perl suggests no packages.
-- no debconf information
More information about the pkg-perl-maintainers
mailing list