[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Net::Domain



I sent this to Graham Barr for inclusion awhile back, and I expect it in
the next revision, but if you use some Perl modules that try to get a
hostname that uses Net::Domain, and you don't have a name but only an IP
address, it can take forever and a day for Net::Domain::domainname to fail.
So I put this on line 218 of Net::Domain 2.09:

    return $fqdn = $host if ($host =~ /\./ && $host =~ /^[\d.]+$/);

I was just reminded of this again while using the CPAN Testers script (I am
rewriting it to work as a droplet, with MacPerl prompts instead of
text-based prompts ... this is going to be so easy you'll have no reason
NOT to be a CPAN Tester!).  I had overwritten my changed version when
getting the latest libnet.

If you have a name for your computer when connected to the Internet, you
are fine.  But I in an internal network usually, and just have a numeric IP
address.

--
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch