CLI::Driver - Drive your cli tool with YAML
This is a module to drive your cli tool from a yaml config file.
use CLI::Driver; my $cli = CLI::Driver->new; my $action = $cli->get_action( name => $ActionFromArgv ); if ($action) { $action->do; } else { $Driver->fatal("failed to find action in config file"); } ### cli-driver.yml example do-something: desc: "Action description" class: name: My::App attr: required: hard: f: foo soft: h: home a: '@array_arg' optional: flags: dry-run: dry_run_flag method: name: my_method args: required: hard: soft: optional: flags: help: args: f: "Additional help info for argument 'f'" examples: - "-f foo -a val1 -a val2 --dry-run"
To install CLI::Driver, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CLI::Driver
CPAN shell
perl -MCPAN -e shell install CLI::Driver
For more information on module installation, please visit the detailed CPAN module installation guide.