CLI-Driver
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/CLI/Driver.pm view on Meta::CPAN
package CLI::Driver;
=head1 NAME
CLI::Driver - Drive your cli tool with YAML
=cut
use Modern::Perl;
use Moose;
use namespace::autoclean;
use Kavorka 'method';
use Data::Printer alias => 'pdump';
use CLI::Driver::Action;
use Module::Load;
use Getopt::Long;
Getopt::Long::Configure('no_ignore_case');
Getopt::Long::Configure('pass_through');
Getopt::Long::Configure('no_auto_abbrev');
use YAML::Syck;
with 'CLI::Driver::CommonRole';
our $VERSION = 0.77;
=head1 SYNOPSIS
use CLI::Driver;
my $cli = CLI::Driver->new;
$cli->run;
- or -
my $cli = CLI::Driver->new(
path => './etc:/etc',
file => 'myconfig.yml'
);
$cli->run;
- or -
my $cli = CLI::Driver->new(
use_file_sharedir => 1,
file_sharedir_dist_name => 'CLI-Driver',
);
$cli->run;
#################################
# cli-driver.yml example
#################################
do-something:
desc: "Action description"
deprecated:
status: false
replaced-by: na
class:
name: My::App
attr:
required:
hard:
f: foo
soft:
h: home
a: '@array_arg'
optional:
flags:
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.509 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )