Code-TidyAll
view release on metacpan or search on metacpan
lib/Code/TidyAll/Plugin.pm view on Meta::CPAN
package Code::TidyAll::Plugin;
use strict;
use warnings;
use Code::TidyAll::Util::Zglob qw(zglobs_to_regex);
use File::Which qw(which);
use IPC::Run3 qw(run3);
use Scalar::Util qw(weaken);
use Specio::Declare;
use Specio::Library::Builtins;
use Specio::Library::Numeric;
use Specio::Library::String;
use Text::Diff 1.44 qw(diff);
use Moo;
our $VERSION = '0.85';
has argv => (
is => 'ro',
isa => t('Str'),
default => q{}
);
# This really belongs in Code::TidyAll::Role::RunsCommand but moving it there
# breaks plugins not in the core distro that expect to just inherit from this
# module and be able to specify a cmd attribute.
has cmd => (
is => 'ro',
isa => t('NonEmptyStr'),
lazy => 1,
builder => '_build_cmd',
);
has diff_on_tidy_error => (
is => 'ro',
isa => t('Bool'),
default => 0
);
has is_tidier => (
is => 'lazy',
isa => t('Bool'),
);
has is_validator => (
is => 'lazy',
isa => t('Bool'),
);
has name => (
is => 'ro',
required => 1
);
has select => (
is => 'lazy',
isa => t( 'ArrayRef', of => t('NonEmptyStr') ),
);
has select_regex => (
is => 'lazy',
isa => t('RegexpRef'),
);
has selects => (
is => 'lazy',
isa => t( 'ArrayRef', of => t('NonEmptyStr') ),
( run in 1.386 second using v1.01-cache-2.11-cpan-39bf76dae61 )