tests/ansible/lib/modules/custom_perl_want_json_module.pl
raw| 1 | #!/usr/bin/perl |
| 2 | |
| 3 | my $WANT_JSON = 1; |
| 4 | |
| 5 | my $json; |
| 6 | { |
| 7 | local $/; #Enable 'slurp' mode |
| 8 | open my $fh, "<", $ARGV[0]; |
| 9 | $json_args = <$fh>; |
| 10 | close $fh; |
| 11 | } |
| 12 | |
| 13 | print "{\n"; |
| 14 | print ' "message": "I am a want JSON perl script! Here is my input.",' . "\n"; |
| 15 | print ' "input": ' . $json_args . "\n"; |
| 16 | print "}\n"; |