develooper Front page | perl.perl5.porters | Postings from February 2000

Re: fixing Sys::Hostname

Ilya Zakharevich
February 7, 2000 14:47
Re: fixing Sys::Hostname
Message ID:
On Mon, Feb 07, 2000 at 02:42:48PM -0800, Russ Allbery wrote:
> Ilya Zakharevich <> writes:
> > But what will it return?  What *is* a host name?
> How about returning the result of gethostname in libc or throwing an
> exception if gethostname isn't implemented on that platform, just like
> symlink and the other core functions that aren't available on some OSes?

If symlink() is not implemented, this is easy to detect.  But imagine
that the C function *is* there, but it just does some trash throwing
when you call it.

My (vague) objections to inclusion are based on expectations that
gethostname() will be almost always present, but will return junk
(thing you would not able to use in your application anyway) on most
systems in existence...  

However, this is probably not that important: it is junk, so what?  We
did what we could to get a correct answer...

This is an attitude too...

Ilya Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About