| Module Info
This does not always do the same thing as Sys::Hostname.
~$ perl -MSys::Hostname::Long=hostname_long -le'print hostname_long'
~$ perl -MSys::Hostname -le'print hostname'
Just use Sys::Hostname -- it does the same thing and it's maintained. :-)
Ridiculously broken on MacOS X. Bug reports in the CPAN RT have had no action from maintainer since 2005, when he closed a ticket citing the breakage which he did not fix for MacOS X.
If you need this rather simple functionality, you are probably better off implementing it yourself, since this module has a history of inattentive maintenance and shoddy code.