#!perl

our $DATE = '2014-11-21'; # DATE
our $VERSION = '0.05'; # VERSION

use 5.010;
use strict;
use warnings;

use Perinci::CmdLine::Any;
Perinci::CmdLine::Any->new(
    subcommands  => {
        add      => {url => '/Perinci/Examples/Bin/Any/Multi/add'},
        subtract => {url => '/Perinci/Examples/Bin/Any/Multi/subtract'},
    },
)->run;

# ABSTRACT: Test command with multiple subcommands
# PODNAME: peri-eg-multi-any

__END__

=pod

=encoding UTF-8

=head1 NAME

peri-eg-multi-any - Test command with multiple subcommands

=head1 VERSION

This document describes version 0.05 of peri-eg-multi-any (from Perl distribution Perinci-Examples-Bin-Any), released on 2014-11-21.

=head1 SYNOPSIS

 % peri-eg-multi-any add [options] <arg1> <arg2>
 % peri-eg-multi-any subtract [options] <arg1> <arg2>

=head1 SUBCOMMANDS

=head2 B<add>

A function to add to ints.

Just a dummy description. Just a dummy description. Yup, just a dummy
description. Just a dummy description. Just a dummy description. Yeah, just a
dummy description. Just a dummy description.


=head2 B<subtract>

A function to subtract to ints.

This function also has result_naked and args_as set to array.

=head1 OPTIONS

C<*> marks required options.

=head2 Common options

=over

=item B<--config-path>=I<s>

Set path to configuration file.

=item B<--config-profile>=I<s>

Set configuration profile to use.

=item B<--format-options>=I<s>

Pass options to formatter.

=item B<--format>=I<s>

Choose output format, e.g. json, text.

=item B<--help>, B<-h>, B<-?>

Display this help message.

=item B<--json>

Equivalent to --format=json-pretty.

=item B<--noconfig>, B<--no-config>

Do not use any configuration file.

=item B<--perl>

Equivalent to --format=perl.

=item B<--subcommands>

List available subcommands.

=item B<--version>, B<-v>

Show version.

=item B<--yaml>

Equivalent to --format=yaml.

=back

=head2 Options for subcommand add

=over

=item B<--arg1>=I<i>*, B<-a>

=item B<--arg2>=I<i>*, B<-b>

=back

=head2 Options for subcommand subtract

=over

=item B<--arg1>=I<i>*, B<-a>

=item B<--arg2>=I<i>*, B<-b>

=back

=head1 FILES

B</etc/peri-eg-multi-any.conf>

B<~/peri-eg-multi-any.conf>

=head1 BASH COMPLETION

This script has bash completion capability.

To activate bash completion for this script, put:

 complete -C peri-eg-multi-any peri-eg-multi-any

in your bash startup (e.g. C<~/.bashrc>). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.

You can also install L<App::BashCompletionProg> which makes it easy to add completion for Perinci::CmdLine-based scripts. After you install the module and put C<. ~/.bash-complete-prog> (or C<. /etc/bash-complete-prog>), you can just run C<bash-completion-prog> and the C<complete> command will be added to your C<~/.bash-completion-prog>. Your next shell session will then recognize tab completion for the command.

=head1 HOMEPAGE

Please visit the project's homepage at L<https://metacpan.org/release/Perinci-Examples-Bin-Any>.

=head1 SOURCE

Source repository is at L<https://github.com/perlancar/perl-Perinci-Examples-Bin-Any>.

=head1 BUGS

Please report any bugs or feature requests on the bugtracker website L<https://rt.cpan.org/Public/Dist/Display.html?Name=Perinci-Examples-Bin-Any>

When submitting a bug or request, please include a test-file or a
patch to an existing test-file that illustrates the bug or desired
feature.

=head1 AUTHOR

perlancar <perlancar@cpan.org>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by perlancar@cpan.org.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
