Skip Menu |

This queue is for tickets about the Net-Nslookup CPAN distribution.

Report information
The Basics
Id: 39371
Status: resolved
Priority: 0/
Queue: Net-Nslookup

People
Owner: darren [...] cpan.org
Requestors: cephalopod [...] mac.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.18
Fixed in: 2.00



Subject: PTR lookups don't work
#!/usr/bin/perl use Net::Nslookup; $Net::Nslookup::DEBUG = 1; $Net::Nslookup::DEBUG_NET_DNS = 1; # example usage. it doesn't return anything. my $name = nslookup(host => "206.33.105.41", type => "PTR"); print "got: '$name'\n"; # the above code returns nothing. The problem is in the _lookup_ptr routine: #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; # for $rr ($query->answer) { # if ($rr->can('ptrdname')) { # push @answers, $rr->ptrdname; # } # } # # return @answers; #} #There seems to be a problem with the method Net::DNS::RR->can() -- I'm not sure it exists. I don't see it in the docs anywhere. #Maybe the code should be: # for $rr ($query->answer) { # if ($rr->ptrdname) { # push @answers, $rr->ptrdname; # } # } #perl v5.8.6 #OS X 10.4
PTR lookups are fixed in the upcoming version 2.0.
This should be resolved in version 2.0.