Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number


by nop (Hermit)
on Apr 08, 2003 at 19:25 UTC ( #249044=perlquestion: print w/ replies, xml ) Need Help??
nop has asked for the wisdom of the Perl Monks concerning the following question:

Hi -- I can get whois info for Yahoo here,

but Net::ParseWhois can't find it:
use Net::ParseWhois; use Data::Dumper; my $w = Net::ParseWhois::Domain->new(''); die unless $w; die unless $w->ok; print "Domain: ", $w->domain, "\n"; print "Name: ", $w->name, "\n"; print "Tag: ", $w->tag, "\n"; print "Address:\n", map { " $_\n" } $w->address; print "Country: ", $w->country, "\n";
Which on my machine generates
Domain: n/a Name: n/a Tag: n/a Address: n/a Country: n/a
What's going on here? Is there a way to point the module at a more comprehensive whois server? Thanks


Comment on NetParseWhois
Select or Download Code
Replies are listed 'Best First'.
Re: NetParseWhois
by Limbic~Region (Chancellor) on Apr 08, 2003 at 19:40 UTC
    Just from peaking in the source code:
    sub TLDs { { COM => '', NET => '', ORG => '' } }
    You could try changing one of these. There is another possibility. According to the docs on CPAN, there is only a finite list of registrars that are supported. Depending on which registrar is returning the value, it may just not know how to parse it.

    Cheers - L~R

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://249044]
Approved by nothingmuch
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (8)
As of 2015-10-09 06:02 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (233 votes), past polls