Sys::Hostname
Native Rust implementation built into the interpreter. Runtime: P5. See original documentation for the full Perl reference.
Functions
hostname
return the system hostname as a PV string.
Mirrors Sys::Hostname XS: calls POSIX gethostname(3) with a 256-byte stack buffer, finds the null terminator, allocates a PV from the bytes up to it, and returns it mortalised.
import
export hostname() into the caller’s package.
Mirrors Exporter: Sys::Hostname has @EXPORT = (‘hostname’).
Gets the CV from Sys::Hostname::hostname and installs it into the
caller’s stash so bare hostname() calls resolve.