App-Easer
view release on metacpan or search on metacpan
lib/App/Easer.pod view on Meta::CPAN
=pod
=for vim
vim: tw=72 ts=3 sts=3 sw=3 et ai :
=encoding utf8
=head1 NAME
App::Easer - Simplify writing (hierarchical) CLI applications
=head1 VERSION
This document describes App::Easer version 2.007004.
=begin html
<a href="https://travis-ci.org/polettix/App-Easer">
<img alt="Build Status" src="https://travis-ci.org/polettix/App-Easer.svg?branch=master">
</a>
<a href="https://www.perl.org/">
<img alt="Perl Version" src="https://img.shields.io/badge/perl-5.24+-brightgreen.svg">
</a>
<a href="https://badge.fury.io/pl/App-Easer">
<img alt="Current CPAN version" src="https://badge.fury.io/pl/App-Easer.svg">
</a>
<a href="http://cpants.cpanauthors.org/dist/App-Easer">
<img alt="Kwalitee" src="http://cpants.cpanauthors.org/dist/App-Easer.png">
</a>
<a href="http://www.cpantesters.org/distro/O/App-Easer.html?distmat=1">
<img alt="CPAN Testers" src="https://img.shields.io/badge/cpan-testers-blue.svg">
</a>
<a href="http://matrix.cpantesters.org/?dist=App-Easer">
<img alt="CPAN Testers Matrix" src="https://img.shields.io/badge/matrix-@testers-blue.svg">
</a>
=end html
=head1 SYNOPSIS
#!/usr/bin/env perl
use v5.24;
use experimental 'signatures';
use App::Easer V2 => 'run';
my $app = {
aliases => ['foo'],
help => 'this is the main app',
description => 'Yes, this really is the main app',
options => [
{
name => 'foo',
help => 'option foo!',
getopt => 'foo|f=s',
environment => 'FOO',
default => 'bar',
},
],
execute => sub ($instance) {
my $foo = $instance->config('foo');
say "Hello, $foo!";
return 0;
},
default_child => '-self', # run execute by default
children => [
{
aliases => ['bar'],
help => 'this is a sub-command',
description => 'Yes, this is a sub-command',
execute => sub { 'Peace!' },
},
],
};
exit run($app, $0, @ARGV);
=head1 DESCRIPTION
B<NOTE>: this software should be considered "late alpha" maturity. I'm
mostly happy with the interface, but there are still a few things that
might get changed. I<Anyway>, if you find a release of C<App::Easer> to
work fine for you, it's fair to assume that you will not need to get a
newer one later.
App::Easer provides the scaffolding for implementing hierarchical
command-line applications in a very fast way.
Development today happens only in L<App::Easer::V2>. The legacy
interface is still available in L<App::Easer::V1>, which is also the
default but has its own documentation.
( run in 1.751 second using v1.01-cache-2.11-cpan-df04353d9ac )