so be passed as JSON or
YAML. For example, if the C<tags> argument is defined as 'array', then all of
below are equivalent:
% mycmd --tags-yaml '[foo, bar, baz]'
% mycmd --tags-json '["foo","bar","
commands)
=item * Configurable output format (--format, --format-options)
By default C<yaml>, C<json>, C<text>, C<text-simple>, C<text-pretty> are
recognized.
=back
=head1 ABOUT THIS MANUAL
This
to be parsed using JSON, and then YAML. This is
convenient for common cases:
--aoa '[[1],[2],[3]]' # parsed as JSON
--hash '{a: 1, b: 2}' # parsed as YAML
For explicit JSON parsing, all argum
as some common options like C<--format> to return the result in a
different format:
% ./hello --json
[200,"OK","Hello, world!"]
% ./hello --format perl; # only in PC::Classic, not available in PC
ame Jimmy --name Sion --name Habil
Hello, Jimmy!
Hello, Sion!
Hello, Habil!
% ./hello --name-json '["Jimmy","Sion","Habil"]' --gender m
Hello, Mr. Jimmy!
Hello, Mr. Sion!
Hello, Mr. Habil!
So
ither specify multiple times (e.g. C<--name
NAME1 --name NAME2 ...>) or specify using JSON (i.e. C<--name-json JSONSTR>).
Second, the C<name> argument specifies the C<slurpy> property. This is used i
scalars (check at most 5 elements), print
as table.
7) otherwise print as JSON (after cleaning it with L<Data::Clean::JSON>).
YAML and the other formats are not supported.
Table is printed using t
it
will get set the default from schema during argument validation:
# via CLI
% progname --baz-json 'null'
# via wrapped function call
funcname(baz=>undef)
Function will receive C<bar> key in i
as some common options like C<--format> to return the result in a
different format:
% ./hello --json
[200,"OK","Hello, world!"]
% ./hello --format perl; # only in PC::Classic, not available in PC
ame Jimmy --name Sion --name Habil
Hello, Jimmy!
Hello, Sion!
Hello, Habil!
% ./hello --name-json '["Jimmy","Sion","Habil"]' --gender m
Hello, Mr. Jimmy!
Hello, Mr. Sion!
Hello, Mr. Habil!
So
ither specify multiple times (e.g. C<--name
NAME1 --name NAME2 ...>) or specify using JSON (i.e. C<--name-json JSONSTR>).
Second, the C<name> argument specifies the C<slurpy> property. This is used i