NAME

Footprintless::CommandOptionsFactory - A factory for creating command options

VERSION

version 1.10

DESCRIPTION

This module creates command opitons that will use Footprintless::Localhost to determine if the hostname in the options is an alias for localhost. If so, it will remove hostname from the options to prevent network operations and allow for local implementation optimizations.

ENTITIES

There are four entites that are used for command options. All four have scalar values. Their defaults are:

    hostname => undef,
    ssh => 'ssh -q',
    sudo_username => undef,
    username => undef

Most (if not all) modules make use of these entities.

CONSTRUCTORS

new(%options)

Constructs an instance of Footprintless::CommandOptionsFactory. The supported options are:

localhost

A preconfigured instance of Footprintless::Localhost. Defaults to an instance with load_all() called.

default_ssh

The default ssh command to use if not supplied in the %options passed in to command_options(%options). Defaults to ssh -q.

METHODS

command_options(%options)

Removes hostname from %options if it is an alias for localhost, then forwards on to Fooptintless::Command::command_options.

AUTHOR

Lucas Theisen <lucastheisen@pastdev.com>

COPYRIGHT AND LICENSE

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.

SEE ALSO

Please see those modules/websites for more information related to this module.