NEW MODULE: Sys::Hostname::Long

Rob rob at cowsnet.com.au
Tue May 7 00:25:17 CDT 2002


G'Day Scott,

> ABSOLUTELY. The current version is the 5 minute hack :-) I
> will have a
> look at the Sys::Hostname code again and do a little protection. Note
> that the newer versions of Sys::Hostname use networking
> methods to get
> the hostname. I am kind of hoping that someone will point out
> I can do
> something similar for fully qualified domain name.

I just did a bit of digging as I remembered writing something about this
on perlmonks - The module which you want to look at I think is
Net::Domain.  It turns out that this module includes a method for
returning the fully-qualified domain name for a host in a much more
determined fashion than Sys::Hostname.

Another method again would be to attempt to establish a UDP connection
to an outside world host and perform a domain lookup on the local IP
address of that connection ... This approach however may be somewhat of
an overkill.

Regards,
Rob


Rob Casey
Business Manager, Senior IT Consultant
Cowsnet Internet and Professional Services
http://www.cowsnet.com.au



> -----Original Message-----
> From: Scott Penrose [mailto:scottp at dd.com.au]
> Sent: Tuesday, May 07, 2002 2:56 PM
> To: rob at cowsnet.com.au
> Cc: melbourne-pm at pm.org
> Subject: Re: NEW MODULE: Sys::Hostname::Long
>
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> On Tuesday, May 7, 2002, at 01:59 , Rob wrote:
>
> > G'Day Scott,
> >
> > I had a quick look at this and had a bit of a chuckle - You
> were right
> > about there not being a lot of code with this module ... It's pretty
> > short and to the point.  I was wondering if it would be worth
> > incorporate localised signal trapping similar to that of
> Sys::Hostname
> > would be worthwhile - particularly for those platforms out
> there that
> > don't have a hostname external function (although none
> immediately come
> > to mind, Windows 95 perhaps?) ..
>
> ABSOLUTELY. The current version is the 5 minute hack :-) I
> will have a
> look at the Sys::Hostname code again and do a little protection. Note
> that the newer versions of Sys::Hostname use networking
> methods to get
> the hostname. I am kind of hoping that someone will point out
> I can do
> something similar for fully qualified domain name.
>
> > BTW Scott, very nice idea to start announcing module
> uploads to the list
> > - It should help all of us here in Melbourne.pm get a
> better idea as to
> > what others in our group are up to.  I'm hoping to make an update to
> > CGI::Upload later today - I'll announce the changes to the list when
> > I've had a chance to do so.
>
> Ta. Yes really I did it because I want to hear what everyone else is
> doing :-)
>
> Scott
>
> > Cheers,
> > Rob
> - ---
> Scott Penrose
> Software Architect - Developer
> http://www.myinternet.com.au/
> scottp at myinternet.com.au
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.6 (Darwin)
> Comment: For info see http://www.gnupg.org
>
> iD8DBQE8115WDCFCcmAm26YRAqeuAJ0TZ62GGWnjNgiZXgGq6XaT/EFjuACgmlOB
> wSxbP+R1j8TK1xMjIzvgg7s=
> =EBEl
> -----END PGP SIGNATURE-----
>
>






More information about the Melbourne-pm mailing list