NAME
CLI::Dispatch::Docopt - CLI dispatcher with affinity for Docopt
SYNOPSIS
in my_command
.
use
Docopt;
my
$opt
= docopt(
argv
=> \
@ARGV
);
run(
'MyApp::CLI'
=>
$opt
);
__END__
=head1 NAME
my_command
=head1 SYNOPSIS
my_command <sub_command> [--foo]
in MyApp::CLI::Qux
.
package
MyApp::CLI::Qux;
use
Data::Dumper;
sub
run {
my
(
$self
,
$opt
) =
@_
;
warn
__PACKAGE__.
" run!\n"
. Dumper(
$opt
);
}
1;
then execute my_command
like this.
$ my_command qux --foo
MyApp::CLI::Qux run!
$VAR1
= {
'<sub_command>'
=>
'qux'
,
'--foo'
=>
bless
(
do
{\(
my
$o
=
'1'
)},
'boolean'
)
};
DESCRIPTION
CLI::Dispatch::Docopt is the CLI dispatcher with affinity for Docopt.
METHODS
run($base_class, $opt[, $method])
The run
function is exported from CLI::Dispatch::Docopt
.
REPOSITORY
CLI::Dispatch::Docopt is hosted on github <http://github.com/bayashi/CLI-Dispatch-Docopt>
Welcome your patches and issues :D
AUTHOR
Dai Okabayashi <bayashi@cpan.org>
SEE ALSO
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.