In article <slrnbj2sal.4o7v.sylalcor.concordia.ca>,
Sylvain Robitaille <sylalcor.concordia.ca> writes:[snip program; can be replaced by>I'm trying to write a Perl script which will (among other things) look
>up the Whois information, based on an IP address it encounters, but the
>responses I'm getting from Net-Whois-IP-0.35 are not what I'm expecting,
>(though I suppose they're technically correct).
>Please consider the following test case:
perl -MData::Dumper -MNet::Whois::IP=whoisip_query \
-e 'print Dumper whoisip_query("188.8.131.52")'
[snip result for NET-132-0-0-0-0]>Now I run the test program:
[snip result for NET-132-205-0-0-1]>However, if I run whois (whois-4.5.29) at the command line, to look up
>the same IP address, I get the following response (which is what I
>expect to see):
First let me thank you for posing a perfectly formed question; all the
information needed (most of which I cut out :-) and a clear question.
I ran this under the debugger and found that the problem is a bug in
Net::Whois::IP. It thinks that if the result does not include a
TechPhone or an OrgTechPhone attribute then it should try a whois
query for the parent handle. This is at odds with its doentation
which says it keeps going until it gets an OrgName or CustName. I
have submitted a bug report. (The NET-132-0-0-0-0 result doesn't
have a *TechPhone attribute either, but its Parent is blank, so the
module gives up there.)
Unless and until the module is improved, you'll need to make a copy of>Does anyone know how to get Net::Whois::IP to send back the response I'm
>expecting, or should I simply call my command-line whois from the script
>I'm writing? (it would of course be much cleaner to use a Perl module
>for this ...)
it to go somewhere earlier in your INC and modify it. I suggest you
look for the line
and on the next (long) line, change TechPhone to NetName and change
OrgTechPhone to OrgName.