Lines Matching full:hostname
1 package Sys::Hostname;
9 our @EXPORT = qw/ hostname /;
30 sub hostname { subroutine
31 @_ and croak("hostname() does not accepts arguments (it used to silently discard any provided)");
47 # TCP/IP stack to advertise the hostname via a logical name. (Are
54 # method 4 - does hostname happen to work?
55 my($rslt) = `hostname`;
66 chomp($host = `hostname 2> NUL`) unless defined $host;
75 # XXX: is it such a good idea to return hostname untainted?
93 # method 3 - trusty old hostname command
97 $host = `(hostname) 2>/dev/null`; # BSDish
129 Sys::Hostname - Try every conceivable way to get hostname
133 use Sys::Hostname;
134 my $host = hostname;
138 Attempts several methods of getting the system hostname and
141 C<syscall(SYS_gethostname)>, C<`hostname`>, C<`uname -n`>,