From f0059f6f9bf3a2d673db5970e92810a0bcca462b Mon Sep 17 00:00:00 2001 From: heinz Date: Sun, 7 Mar 2004 01:23:28 +0000 Subject: 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. --- sysutils/p5-Sys-Hostname-Long/patches/patch-aa | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 sysutils/p5-Sys-Hostname-Long/patches/patch-aa (limited to 'sysutils/p5-Sys-Hostname-Long/patches') 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; -- cgit v1.2.3