Response Format

Todd Caine todd_caine at eli.net
Wed Aug 14 19:09:59 EDT 2002


I guess there was some confusion.  The Net::Whois::ARIN perl module does not
generate XML output.  In the specific example that I gave I was doing a beta
whois query on the handle ELIX.  Here is what this would look like using telnet:

$ telnet beta.arin.net 4344
! ELIX

OrgName: Electric Lightwave Inc
OrgID:   ELIX
Address: 4400 NE 77th Ave Vancouver, WA 98662
Country: US
Comment:
RegDate: 1999-01-19
Updated: 2001-09-26

# ARIN Whois database, last updated 2002-07-31 04:34
# Enter ? for additional hints on searching ARIN's Whois database.

Notice that this case does not generate more than one Comment field so no
nesting is needed to handle this response.  The example I showed returns a hash
which is equivalent to the declaration:

%rec = (
  OrgName => 'Electric Lightwave Inc',
  OrgID   => 'ELIX',
  Address => '4400 NE 77th Ave Vancouver, WA 98662',
  Country => 'US',
  Comment => '',
  RegDate => '1999-01-19',
  Updated => '2001-09-26',
);

I realize that this discussion should probably be taken off list but I'd like to
briefly explain how multi-record detailed responses are handled.  Each detailed
record returned from the whois server can be represented with a hash.  If the
request method chosen has the possibility to return more that one detailed
record a list of hash references would be returned.  Now fields like Nameserver
have to be handled differently because there can be more than one of these per
record, not just per response.  If this is confusing send me email directly and
I'll clarify what I'm trying to say.  :)  I don't want to drive everyone crazy
if they aren't interested in discussing the details of my interface.

I'm setting up a sourceforge project in case anyone is interested in working on
this module.  I'm having some issues importing my sources into the CVS
repository but the current snapshot can be found at
http://net-whois-arin.sourceforge.net/source/Net-Whois-ARIN-0.01.tar.gz if
anyone wants to give it a try.  Remember this is alpha software, if you break it
you get both halves.  Please send me email directly if you'd like to comment on
the module or if you have any suggestions until I can get the sf.net site set
up.

Cheers,
Todd

John Brzozowski wrote:

> I certainly would not mind looking at what you have done in Perl for
> converting the output to XML.  One thing that was noticed about your example
> is the handling of duplicate fields from WhoIs.  For example, there are
> three <Comments> field that come back from WhoIs.  One for each of the
> following: 1) the ISP, 2) the Customer, and the 3) the Customer's address
> block.




More information about the Dbwg mailing list