Footprintless::Localhost - A localhost alias resolver
version 1.01
Provides a fairly thorough attempt to determine if a supplied hostname is an alias for localhost (resolves to the same physical machine). This can be useful in determining if local commands can be used in place of remote commands. This is primarily used by the Footprintless::CommandOptionsFactory to create appropriate command options for configured entities.
Constructs a new Footprintless::Localhost
preconfigured with the default aliases (localhost
,
127.0.0.1
).
The available options are:
An initial set of preconfigured aliases that should resolve to localhost.
Sets the value that will be returned if is_alias
is called with a falsey value.
Stops the constructor from initializing the default aliases: localhost
,
127.0.0.1
.
Returns a truthy value if $hostname
is an alias for localhost.
Returns a truthy value if $source
has already been loaded.
Each source is loaded using the load_$source
method.
Loads aliases from all sources.
Loads aliases from the /etc/hosts
file.
Loads aliases from the hostfqdn
command.
Loads aliases from the hostname
command.
Lucas Theisen <lucastheisen@pastdev.com>
This software is copyright (c) 2016 by Lucas Theisen.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Please see those modules/websites for more information related to this module.