in reply to Net::Whois troubles

Looking at the innards of Net::Whois when it makes a request for maserith.com, the results from the whois server are coming back in a form that Net::Whois doesn't understand. Which is bad news, because even though it's a valid return, Net::Whois can't understand it.

Which leaves you in the position of patching Net::Whois, perhaps. :)

On the question of whether it's (un)reliable: you might take a look at this message from the modules@perl.org list. I'm not in a position to say one way or the other who's in the right :), but it certainly does seem that Net::Whois needs some changes/fixes.

And with that in mind, you might take a look at the module mentioned in that message, Net::ParseWhois. I just tried it myself, and it works for maserith.com. The interface seems to be identical to that of Net::Whois; just change instances of Net::Whois to Net::ParseWhois and you're done:

use Net::ParseWhois; my $w = new Net::ParseWhois::Domain "maserith.com"; ....

Replies are listed 'Best First'.
(Ovid) Re(2): Net::Whois troubles
by Ovid (Cardinal) on Nov 30, 2000 at 06:25 UTC
    btrott, that is exactly what I was looking for. It seems to work perfectly and when I dumped it into a much larger and more substantial script, everything came out exactly the way I wanted it. After reading about the dispute that's keeping this module from CPAN, all I can think is that everyone needs to put their frickin' egos aside and let people use this.

    Personally, I'm going to send an e-mail to the author thanking him for creating this and perhaps urge him to upload it anyway (I'll have to reread the correspondence, but we really could use this module). I wonder how many other people were beating their heads over this situation and were being forced to do it by hand?

    A thousand thanks!!!

    Cheers,
    Ovid

    Update: I read the correspondense too quickly. I'll definitely thank the author, but I think I was premature in thinking I would urge him to upload regardles of the dispute. I have to confess that I sympathize with Abraham's feeling's about Net::Whois's source code (well, he hinted at them, he didn't explicitly state them). It looks pretty ugly.

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

      see my code at Whois+DNS for a cool application of Net::ParseWhois.