AnsibleModule

 view release on metacpan or  search on metacpan

lib/AnsibleModule.pm  view on Meta::CPAN


=for comment

We want JSON
WANT_JSON

=cut

use Mojo::JSON qw/decode_json encode_json/;
use Mojo::File qw/path/;
use POSIX qw/locale_h/;
use Carp qw/croak/;


has argument_spec           => sub { +{} };
has bypass_checks           => sub {0};
has no_log                  => sub {0};
has check_invalid_arguments => sub {1};
has mutually_exclusive      => sub { [] };
has required_together       => sub { [] };
has required_one_of         => sub { [] };

lib/AnsibleModule.pm  view on Meta::CPAN

};

has _legal_inputs => sub {
  {CHECKMODE => 1, NO_LOG => 1};
};

has check_mode => sub {0};

sub new {
  my $self = shift->SUPER::new(@_);
  setlocale(LC_ALL, "");
  $self->_check_argument_spec();
  $self->_check_params();
  unless ($self->bypass_checks) {
    $self->_check_arguments();
    $self->_check_required_together();
    $self->_check_required_one_of();
    $self->_check_required_if();
  }
  $self->_log_invocation() unless $self->no_log();
  $self->_set_cwd();



( run in 1.678 second using v1.01-cache-2.11-cpan-ceb78f64989 )