Subject: | Several Bugs and Improvemets for Net::Whois::IANA |
I just installed and used Net::Whois::IANA (0.23). While doing
so, I had to make some improvements to get it run smoothly. Attached is
the file IANA.pm with my modifications (all marked by "debug RR",
even not all things are bugs ;-) ).
Main problems I had (and which I solved):
* [Important] The IP in %IANA{arin} were not accessible.
Solution:
I moved 'whois.arin.net' to the first position of the array, and
added the IP I got by 'ping whois.arin.net' to the second place.
* [Normal] Information which is combined from multiple Whois-entries
were concatenated with an empty string (which does not look good and
if You like to do further processing on the data You can not. (I
detected it using $iana->desrc() )
Solution:
Added a global variable $MFS ("multiple field separator") containing a
sequence of characters which (hopefully) never occures whithin a
string returned by a Whois server. Maybe $MFS should be an
init-parameter.
* [Important] While get an answer of a Whois-query to a LACNIC server
it was not really the LACNIC-format which came back. In fact it was
the result of a redirect to an ARIN or an AFRINIC databse. That leads
to parsing errors.
Solution:
I introduced a way to detect such a redirect and to call the correct
parsing-function. May be this should included to all of the
*_query()-functions?
* [Normal] Detected a redirect to the Whois server 'whois.registro.br',
which seems to have the same format as LACNIC.
Solution:
Added registro_query() just for parsing a redirected query.
* [Normal] Got an undefined value for 'descr' and 'netname' in LACNIC-
queries.
Solution:
Applying the above redirect. The undefined values were because of the
wrong format. The lines to avoid warning messages are still in the
code, but as a comment.
* [Important] cidr() for LACNIC-queries did not returned a string (it
was an array).
Solution:
Return a string.
* [Normal] inetnum() missed sometimes in LACNIC-queries.
Solution:
Applying the above redirect. The missing inetnum was because of the
wrong format. The lines to calculate the inetnum from the CIDR-value
are still in the code, but as a comment.
* [Normal] Got warning messages for missing 'nserver'-value in LACNIC-
queries.
Solution:
Applying the above redirect. The missing value was because of the
wrong format. The line to avoid warning messages is still in the
code, but as a comment.
Subject: | IANA.pm |
Message body is not shown because it is too large.