Footprintless::Localhost - A localhost alias resolver
version 1.10
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:
Footprintless::Localhost
localhost
127.0.0.1
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.
is_alias
Stops the constructor from initializing the default aliases: localhost, 127.0.0.1.
Returns a truthy value if $hostname is an alias for localhost.
$hostname
Returns a truthy value if $source has already been loaded. Each source is loaded using the load_$source method.
$source
load_$source
Loads aliases from all sources.
Loads aliases from the /etc/hosts file.
/etc/hosts
Loads aliases from the hostfqdn command.
hostfqdn
Loads aliases from the hostname command.
hostname
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.
Footprintless
Footprintless::CommandOptionsFactory
To install Footprintless, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Footprintless
CPAN shell
perl -MCPAN -e shell install Footprintless
For more information on module installation, please visit the detailed CPAN module installation guide.