t JSON output.
This routine provides a convenience way to get a data structure from running a
CLI command. It basically just calls the script with `--json` and
`--no-naked-res` then decodes the JSON
result so you get a data structure
directly. Will return error 599 if output is not valid JSON.
Other features might be added in the future, e.g. retry, custom configuration
file, etc.
_
args =>
t => [],
},
},
};
sub call_cli_script {
require IPC::System::Options;
require JSON::MaybeXS;
my %args = @_;
my $script = $args{script};
my $argv = $args{argv} // []