Group
Extension

Matches 2

AnsibleModule ( M/MR/MRAMBERG/AnsibleModule-0.4.tar.gz, MRAMBERG, 2017; MetaCPAN )
AnsibleModule/lib/AnsibleModule.pm ( view source; MetaCPAN )

use Mojo::Base -base;

our $VERSION = '0.4';

=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/croa
0])->slurp;
  my $json = decode_json($args);
  return $json if defined $json;
  my $params = {};
  for my $arg (split $args) {
    my ($k, $v) = split '=', $arg;
    $self->fail_json(
      {msg => 'T
his module requires key=value style argument: ' . $arg})
      unless defined $v;
    $self->fail_json({msg => "Duplicate parameter: $k"})
      if exists $params->{$k};
    $params->{$k} = $v;
  }
  
AnsibleModule ( M/MR/MRAMBERG/AnsibleModule-0.4.tar.gz, MRAMBERG, 2017; MetaCPAN )
AnsibleModule/lib/Test/AnsibleModule.pm ( view source; MetaCPAN )
package Test::AnsibleModule;

use Mojo::Base -base;
use Test::More;
use Mojo::JSON qw/decode_json encode_json/;
use Mojo::Asset::File;
use Carp qw/croak/;
use Data::Dumper qw/Dumper/;
$Data::Dumper::S
rgs   = ref $_[0] ? $_[0] : {@_};

  my $file = Mojo::Asset::File->new;
  $file->add_chunk(encode_json($args));
  my $p;

  open($p, "-|", join(" ", $module, $file->path))
    // croak "Could not run 

  my $response = "";

  while (my $line = <$p>) {
    $response .= $line;
  }
  my $res = decode_json($response);
  $self->last_response($res);
  close $p;
  return $? >> 8;
}

sub _test {
  my ($sel

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.