diff options
author | heinz <heinz@pkgsrc.org> | 2004-03-07 01:23:28 +0000 |
---|---|---|
committer | heinz <heinz@pkgsrc.org> | 2004-03-07 01:23:28 +0000 |
commit | f0059f6f9bf3a2d673db5970e92810a0bcca462b (patch) | |
tree | 12868d63df85ff0b783ebcc8128b187864d55573 /sysutils/p5-Sys-Hostname-Long/patches | |
parent | 8cd23a0f10fa192c982fcef2cf37580a48c74cbe (diff) | |
download | pkgsrc-f0059f6f9bf3a2d673db5970e92810a0bcca462b.tar.gz |
Initial import of p5-Sys-Hostname-Long.
This Perl module tries to determine the full host name in a portable way
on multiple operating systems (mac, windows, unix*).
A patch is included which should make this module work on most *nix
platforms, not just on Linux. Submitted to the author via rt.cpan.org.
Diffstat (limited to 'sysutils/p5-Sys-Hostname-Long/patches')
-rw-r--r-- | sysutils/p5-Sys-Hostname-Long/patches/patch-aa | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sysutils/p5-Sys-Hostname-Long/patches/patch-aa b/sysutils/p5-Sys-Hostname-Long/patches/patch-aa new file mode 100644 index 00000000000..0e8dd2d2d53 --- /dev/null +++ b/sysutils/p5-Sys-Hostname-Long/patches/patch-aa @@ -0,0 +1,16 @@ +$NetBSD: patch-aa,v 1.1.1.1 2004/03/07 01:23:28 heinz Exp $ + +--- lib/Sys/Hostname/Long.pm.orig Sat Sep 22 08:23:46 2001 ++++ lib/Sys/Hostname/Long.pm +@@ -35,8 +35,9 @@ sub hostname_long { + # . Linux + # . FreeBSD + # - MacOS X (Rhapsody/Darwin) +- $hostlong = `hostname --fqdn`; +- $hostlong =~ tr/\0\r\n//d; ++ # Emulate `hostname --fqdn` with Perl; more portable ++ $hostlong = Sys::Hostname::hostname(); ++ ($hostlong) = gethostbyname($hostlong); + } + + return $hostlong; |