You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitogen/tests/ansible/lib/modules/custom_perl_want_json_modul...

22 lines
326 B
Perl

#!/usr/bin/perl
binmode STDOUT, ":utf8";
use utf8;
my $WANT_JSON = 1;
use JSON;
my $json;
{
local $/; #Enable 'slurp' mode
open my $fh, "<", $ARGV[0];
$json_args = <$fh>;
close $fh;
}
print encode_json({
message => "I am a want JSON perl script! Here is my input.",
input => [decode_json($json_args)]
});