Group
Extension

Matches 5

Perinci-CmdLine ( P/PE/PERLANCAR/Perinci-CmdLine-2.000.1.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-CmdLine/lib/Perinci/CmdLine/Manual.pod ( view source; MetaCPAN )
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
Perinci-CmdLine ( P/PE/PERLANCAR/Perinci-CmdLine-2.000.1.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-CmdLine/lib/Perinci/CmdLine/Manual/HowTo/99Examples.pod ( view source; MetaCPAN )
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
Perinci-CmdLine ( P/PE/PERLANCAR/Perinci-CmdLine-2.000.1.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-CmdLine/lib/Perinci/CmdLine/Manual/FAQ.pod ( view source; MetaCPAN )
 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
Perinci-CmdLine ( P/PE/PERLANCAR/Perinci-CmdLine-2.000.1.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-CmdLine/lib/Perinci/CmdLine/Manual/Explanation/ArgumentValidation.pod ( view source; MetaCPAN )
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
Perinci-CmdLine ( P/PE/PERLANCAR/Perinci-CmdLine-2.000.1.tar.gz, PERLANCAR, 2024; MetaCPAN )
Perinci-CmdLine/lib/Perinci/CmdLine/Manual/Examples.pod ( view source; MetaCPAN )
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

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