App-perlimports
view release on metacpan or search on metacpan
lib/App/perlimports/CLI.pm view on Meta::CPAN
package App::perlimports::CLI;
use Moo;
use utf8;
our $VERSION = '0.000060';
use App::perlimports ();
use App::perlimports::Config ();
use App::perlimports::Document ();
use Capture::Tiny qw( capture_stdout );
use Getopt::Long::Descriptive qw( describe_options );
use List::Util qw( uniq );
use Log::Dispatch ();
use Path::Iterator::Rule ();
use Path::Tiny qw( path );
use Try::Tiny qw( catch try );
use Types::Standard qw( ArrayRef Bool HashRef InstanceOf Object Str );
has _args => (
is => 'ro',
isa => HashRef,
lazy => 1,
builder => '_build_args',
);
has _config => (
is => 'ro',
isa => InstanceOf [App::perlimports::Config::],
lazy => 1,
builder => '_build_config',
);
has _config_file => (
is => 'ro',
isa => Str,
lazy => 1,
init_arg => 'config',
builder => '_build_config_file',
);
# off by default
has _inplace_edit => (
is => 'ro',
isa => Bool,
lazy => 1,
default => sub {
my $self = shift;
return
defined $self->_opts->inplace_edit
? $self->_opts->inplace_edit
: 0;
},
);
has _json => (
is => 'ro',
isa => Bool,
lazy => 1,
default => sub {
my $self = shift;
return defined $self->_opts->json
? $self->_opts->json
: 0;
},
);
has _lint => (
is => 'ro',
isa => Bool,
lazy => 1,
default => sub {
my $self = shift;
return defined $self->_opts->lint
? $self->_opts->lint
: 0;
},
( run in 3.113 seconds using v1.01-cache-2.11-cpan-df04353d9ac )