perl5
perl5 copied to clipboard
[doc] No documentation about our $host and used environment variables
Where Sys::Hostname
Description
Please document $Sys::Hostname::host variable and $ENV{*} variables which are used to detect hostname.
Where Sys::Hostname
Description Please document
$Sys::Hostname::hostvariable and $ENV{*} variables which are used to detect hostname.
I don't see a strong need to add to this:
NAME
Sys::Hostname - Try every conceivable way to get hostname
SYNOPSIS
use Sys::Hostname;
$host = hostname;
DESCRIPTION
Attempts several methods of getting the system hostname and then caches the
result. ...
What exactly do you find inadequate there?
I think the particular $ENV{...} variables the module uses are internal implementation details.
The problem was how to mock hostname.
I can use $Sys::Hostname::host = 'manual' to mock it. Also I was thinking about:
HOSTNAME=manual perl some_application.pl