diff --git a/perlimports.toml b/perlimports.toml new file mode 100644 index 00000000..06f129e9 --- /dev/null +++ b/perlimports.toml @@ -0,0 +1,30 @@ +# Valid log levels are: +# debug, info, notice, warning, error, critical, alert, emergency +# critical, alert and emergency are not currently used. +# +# Please use boolean values in this config file. Negated options (--no-*) are +# not permitted here. Explicitly set options to true or false. +# +# Some of these values deviate from the regular perlimports defaults. In +# particular, you're encouraged to leave preserve_duplicates and +# preserve_unused disabled. + +cache = false # setting this to true is currently discouraged +ignore_modules = [ + "lib::relative", + "Code::TidyAll::CacheModel::Shared", + "Test::Class::Most", + "Test::More", +] +ignore_modules_filename = "" +ignore_modules_pattern = "" # regex like "^(Foo|Foo::Bar)" +ignore_modules_pattern_filename = "" +libs = ["lib", "t/lib"] +log_filename = "" +log_level = "warn" +never_export_modules = [] +never_export_modules_filename = "" +padding = true +preserve_duplicates = false +preserve_unused = false +tidy_whitespace = true diff --git a/t/Basic.t b/t/Basic.t index 3bbb617c..89062a5c 100644 --- a/t/Basic.t +++ b/t/Basic.t @@ -5,8 +5,8 @@ use warnings; use lib::relative 'lib'; -use Config; -use File::Spec; +use Config qw( %Config ); +use File::Spec (); # We need to make sure that t/lib is seen across forks _and_ we want to make # sure that the paths are absolute because Code::TidyAll may chdir while @@ -20,5 +20,5 @@ $ENV{PERL5LIB} = join( ) ); -use TestFor::Code::TidyAll::Basic; +use TestFor::Code::TidyAll::Basic (); TestFor::Code::TidyAll::Basic->runtests; diff --git a/t/Conf.t b/t/Conf.t index 1dd9d46e..5f7c746f 100644 --- a/t/Conf.t +++ b/t/Conf.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Conf; +use TestFor::Code::TidyAll::Conf (); TestFor::Code::TidyAll::Conf->runtests; diff --git a/t/Git.t b/t/Git.t index ef34aed1..8365e014 100644 --- a/t/Git.t +++ b/t/Git.t @@ -1,5 +1,5 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Git; +use TestFor::Code::TidyAll::Git (); $ENV{LC_ALL} = 'C'; TestFor::Code::TidyAll::Git->runtests; diff --git a/t/Plugin-CSSUnminifier.t b/t/Plugin-CSSUnminifier.t index 17f187d1..50aec005 100644 --- a/t/Plugin-CSSUnminifier.t +++ b/t/Plugin-CSSUnminifier.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::CSSUnminifier; +use TestFor::Code::TidyAll::Plugin::CSSUnminifier (); TestFor::Code::TidyAll::Plugin::CSSUnminifier->runtests; diff --git a/t/Plugin-GenericTransformer.t b/t/Plugin-GenericTransformer.t index 1189f186..7b7aa650 100644 --- a/t/Plugin-GenericTransformer.t +++ b/t/Plugin-GenericTransformer.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::GenericTransformer; +use TestFor::Code::TidyAll::Plugin::GenericTransformer (); TestFor::Code::TidyAll::Plugin::GenericTransformer->runtests; diff --git a/t/Plugin-GenericValidator.t b/t/Plugin-GenericValidator.t index 93591b80..c7627e55 100644 --- a/t/Plugin-GenericValidator.t +++ b/t/Plugin-GenericValidator.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::GenericValidator; +use TestFor::Code::TidyAll::Plugin::GenericValidator (); TestFor::Code::TidyAll::Plugin::GenericValidator->runtests; diff --git a/t/Plugin-JSBeautify.t b/t/Plugin-JSBeautify.t index 5c6b1372..c4e8e15b 100644 --- a/t/Plugin-JSBeautify.t +++ b/t/Plugin-JSBeautify.t @@ -1,5 +1,5 @@ #!/usr/bin/perl use lib::relative 'lib'; use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::JSBeautify; +use TestFor::Code::TidyAll::Plugin::JSBeautify (); TestFor::Code::TidyAll::Plugin::JSBeautify->runtests; diff --git a/t/Plugin-JSHint.t b/t/Plugin-JSHint.t index 28efd104..3f557beb 100644 --- a/t/Plugin-JSHint.t +++ b/t/Plugin-JSHint.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::JSHint; +use TestFor::Code::TidyAll::Plugin::JSHint (); TestFor::Code::TidyAll::Plugin::JSHint->runtests; diff --git a/t/Plugin-JSLint.t b/t/Plugin-JSLint.t index 5d59c556..b77e234c 100644 --- a/t/Plugin-JSLint.t +++ b/t/Plugin-JSLint.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::JSLint; +use TestFor::Code::TidyAll::Plugin::JSLint (); TestFor::Code::TidyAll::Plugin::JSLint->runtests; diff --git a/t/Plugin-MasonTidy.t b/t/Plugin-MasonTidy.t index 9fc8d77f..d2a9eaf0 100644 --- a/t/Plugin-MasonTidy.t +++ b/t/Plugin-MasonTidy.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::MasonTidy; +use TestFor::Code::TidyAll::Plugin::MasonTidy (); TestFor::Code::TidyAll::Plugin::MasonTidy->runtests; diff --git a/t/Plugin-PHPCodeSniffer.t b/t/Plugin-PHPCodeSniffer.t index c7d8b26d..cdf4c53b 100644 --- a/t/Plugin-PHPCodeSniffer.t +++ b/t/Plugin-PHPCodeSniffer.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PHPCodeSniffer; +use TestFor::Code::TidyAll::Plugin::PHPCodeSniffer (); TestFor::Code::TidyAll::Plugin::PHPCodeSniffer->runtests; diff --git a/t/Plugin-PerlCritic.t b/t/Plugin-PerlCritic.t index 21e57a04..8f505b5d 100644 --- a/t/Plugin-PerlCritic.t +++ b/t/Plugin-PerlCritic.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PerlCritic; +use TestFor::Code::TidyAll::Plugin::PerlCritic (); TestFor::Code::TidyAll::Plugin::PerlCritic->runtests; diff --git a/t/Plugin-PerlTidy.t b/t/Plugin-PerlTidy.t index b8d40378..ecc00fde 100644 --- a/t/Plugin-PerlTidy.t +++ b/t/Plugin-PerlTidy.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PerlTidy; +use TestFor::Code::TidyAll::Plugin::PerlTidy (); TestFor::Code::TidyAll::Plugin::PerlTidy->runtests; diff --git a/t/Plugin-PerlTidySweet.t b/t/Plugin-PerlTidySweet.t index dcf09781..5c4c592d 100644 --- a/t/Plugin-PerlTidySweet.t +++ b/t/Plugin-PerlTidySweet.t @@ -6,5 +6,5 @@ plan skip_all => 'This plugin requires Perl 5.10+' unless $] >= 5.010; use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PerlTidySweet; +use TestFor::Code::TidyAll::Plugin::PerlTidySweet (); TestFor::Code::TidyAll::Plugin::PerlTidySweet->runtests; diff --git a/t/Plugin-PodChecker.t b/t/Plugin-PodChecker.t index 6df29944..c1786f8d 100644 --- a/t/Plugin-PodChecker.t +++ b/t/Plugin-PodChecker.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PodChecker; +use TestFor::Code::TidyAll::Plugin::PodChecker (); TestFor::Code::TidyAll::Plugin::PodChecker->runtests; diff --git a/t/Plugin-PodSpell.t b/t/Plugin-PodSpell.t index 429a8757..4b90fd1d 100644 --- a/t/Plugin-PodSpell.t +++ b/t/Plugin-PodSpell.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PodSpell; +use TestFor::Code::TidyAll::Plugin::PodSpell (); TestFor::Code::TidyAll::Plugin::PodSpell->runtests; diff --git a/t/Plugin-PodTidy.t b/t/Plugin-PodTidy.t index e0cac884..d9be0143 100644 --- a/t/Plugin-PodTidy.t +++ b/t/Plugin-PodTidy.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::PodTidy; +use TestFor::Code::TidyAll::Plugin::PodTidy (); TestFor::Code::TidyAll::Plugin::PodTidy->runtests; diff --git a/t/Plugin-SortLines.t b/t/Plugin-SortLines.t index 0bbda834..d6fa8298 100644 --- a/t/Plugin-SortLines.t +++ b/t/Plugin-SortLines.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Plugin::SortLines; +use TestFor::Code::TidyAll::Plugin::SortLines (); TestFor::Code::TidyAll::Plugin::SortLines->runtests; diff --git a/t/Util.t b/t/Util.t index 56a78ff2..a4615d75 100644 --- a/t/Util.t +++ b/t/Util.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Util; +use TestFor::Code::TidyAll::Util (); TestFor::Code::TidyAll::Util->runtests; diff --git a/t/Zglob.t b/t/Zglob.t index 3d316577..301834b8 100644 --- a/t/Zglob.t +++ b/t/Zglob.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Util::Zglob; +use TestFor::Code::TidyAll::Util::Zglob (); TestFor::Code::TidyAll::Util::Zglob->runtests; diff --git a/t/diff-on-tidy-error.t b/t/diff-on-tidy-error.t index 8351324f..d5c3cdad 100644 --- a/t/diff-on-tidy-error.t +++ b/t/diff-on-tidy-error.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::DiffOnTidyError; +use TestFor::Code::TidyAll::DiffOnTidyError (); TestFor::Code::TidyAll::DiffOnTidyError->runtests; diff --git a/t/helper-bin/generic-transformer.pl b/t/helper-bin/generic-transformer.pl index 4107f5d8..54c3aebc 100644 --- a/t/helper-bin/generic-transformer.pl +++ b/t/helper-bin/generic-transformer.pl @@ -1,6 +1,6 @@ use strict; use warnings; -use Path::Tiny qw/ path /; +use Path::Tiny qw( path ); my $content = path(shift)->slurp; $content =~ s/forbidden/safe/i; diff --git a/t/helper-bin/generic-validator.pl b/t/helper-bin/generic-validator.pl index f8ade689..c38bf182 100644 --- a/t/helper-bin/generic-validator.pl +++ b/t/helper-bin/generic-validator.pl @@ -1,5 +1,5 @@ use strict; use warnings; -use Path::Tiny qw/ path /; +use Path::Tiny qw( path ); exit 1 if path(shift)->slurp =~ /forbidden/i; diff --git a/t/lib/TestFor/Code/TidyAll/Basic.pm b/t/lib/TestFor/Code/TidyAll/Basic.pm index 0d978451..ee96cfe1 100644 --- a/t/lib/TestFor/Code/TidyAll/Basic.pm +++ b/t/lib/TestFor/Code/TidyAll/Basic.pm @@ -1,17 +1,17 @@ package TestFor::Code::TidyAll::Basic; -use Capture::Tiny qw(capture capture_stdout capture_merged); +use Capture::Tiny qw( capture_merged capture_stdout ); use Code::TidyAll::CacheModel::Shared; -use Code::TidyAll::Util qw(tempdir_simple); -use Code::TidyAll; -use File::Find qw(find); -use File::pushd qw(pushd); -use FindBin qw( $Bin ); -use IPC::Run3 qw( run3 ); -use Path::Tiny qw(path); +use Code::TidyAll::Util qw( tempdir_simple ); +use Code::TidyAll (); +use File::Find qw( find ); +use File::pushd qw( pushd ); +use FindBin qw( $Bin ); +use IPC::Run3 qw( run3 ); +use Path::Tiny qw( path ); use Test::Class::Most parent => 'TestHelper::Test::Class'; -use Test::Fatal; +use Test::Fatal qw( exception ); use Test::Warnings; sub test_plugin {"+TestHelper::Plugin::$_[0]"} diff --git a/t/lib/TestFor/Code/TidyAll/Conf.pm b/t/lib/TestFor/Code/TidyAll/Conf.pm index 49d6a37e..4621bb7b 100644 --- a/t/lib/TestFor/Code/TidyAll/Conf.pm +++ b/t/lib/TestFor/Code/TidyAll/Conf.pm @@ -1,7 +1,7 @@ package TestFor::Code::TidyAll::Conf; -use Code::TidyAll; -use Code::TidyAll::Util qw(tempdir_simple); +use Code::TidyAll (); +use Code::TidyAll::Util qw( tempdir_simple ); use Test::Class::Most parent => 'TestHelper::Test::Class'; my @tests = ( diff --git a/t/lib/TestFor/Code/TidyAll/Git.pm b/t/lib/TestFor/Code/TidyAll/Git.pm index f7876745..e5a73d2b 100644 --- a/t/lib/TestFor/Code/TidyAll/Git.pm +++ b/t/lib/TestFor/Code/TidyAll/Git.pm @@ -1,16 +1,16 @@ package TestFor::Code::TidyAll::Git; -use Capture::Tiny qw(capture capture_stderr); -use Code::TidyAll::Git::Util qw(git_files_to_commit git_modified_files); -use Code::TidyAll::Util qw(tempdir_simple); -use Code::TidyAll; -use File::pushd qw(pushd); -use File::Spec; -use FindBin qw( $Bin ); -use IPC::System::Simple qw(capturex runx); -use Path::Tiny qw(path); +use Capture::Tiny qw( capture capture_stderr ); +use Code::TidyAll::Git::Util qw( git_files_to_commit git_modified_files ); +use Code::TidyAll::Util qw( tempdir_simple ); +use Code::TidyAll (); +use File::pushd qw( pushd ); +use File::Spec (); +use FindBin qw( $Bin ); +use IPC::System::Simple qw( capturex runx ); +use Path::Tiny qw( path ); use Test::Class::Most parent => 'TestHelper::Test::Class'; -use Try::Tiny; +use Try::Tiny qw( catch try ); use constant IS_WIN32 => $^O eq 'MSWin32'; diff --git a/t/lib/TestFor/Code/TidyAll/Parallel.pm b/t/lib/TestFor/Code/TidyAll/Parallel.pm index 96a673f5..dd12d449 100644 --- a/t/lib/TestFor/Code/TidyAll/Parallel.pm +++ b/t/lib/TestFor/Code/TidyAll/Parallel.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Parallel::ForkManager )) { diff --git a/t/lib/TestFor/Code/TidyAll/Plugin.pm b/t/lib/TestFor/Code/TidyAll/Plugin.pm index 84d7605e..1d8e343e 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin.pm @@ -4,10 +4,10 @@ use strict; use warnings; use autodie; -use Capture::Tiny qw(capture); -use Code::TidyAll::Util qw(tempdir_simple); -use Code::TidyAll; -use Path::Tiny qw(path); +use Capture::Tiny qw( capture ); +use Code::TidyAll::Util qw( tempdir_simple ); +use Code::TidyAll (); +use Path::Tiny qw( path ); use Test::Class::Most parent => 'TestHelper::Test::Class'; use Test::Differences qw( eq_or_diff ); diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/JSBeautify.pm b/t/lib/TestFor/Code/TidyAll/Plugin/JSBeautify.pm index 9e60c310..b50a80ec 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/JSBeautify.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/JSBeautify.pm @@ -1,6 +1,6 @@ package TestFor::Code::TidyAll::Plugin::JSBeautify; -use Encode qw(encode); +use Encode qw( encode ); use Path::Tiny qw( cwd ); use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; use Test::Warnings qw( warnings ); diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/MasonTidy.pm b/t/lib/TestFor/Code/TidyAll/Plugin/MasonTidy.pm index 1a41149f..ea69dfba 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/MasonTidy.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/MasonTidy.pm @@ -3,7 +3,7 @@ package TestFor::Code::TidyAll::Plugin::MasonTidy; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Mason::Tidy )) { diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/PerlCritic.pm b/t/lib/TestFor/Code/TidyAll/Plugin/PerlCritic.pm index 96490f6f..8d06bdf1 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/PerlCritic.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/PerlCritic.pm @@ -2,9 +2,7 @@ package TestFor::Code::TidyAll::Plugin::PerlCritic; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; -use Code::TidyAll::Plugin::PerlCritic; -use Module::Runtime qw( require_module ); -use Try::Tiny; +use Code::TidyAll::Plugin::PerlCritic (); sub test_main : Tests { my $self = shift; diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidy.pm b/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidy.pm index 2faf42a7..6d7d49e2 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidy.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidy.pm @@ -2,9 +2,9 @@ package TestFor::Code::TidyAll::Plugin::PerlTidy; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; -use Getopt::Long; +use Getopt::Long (); use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Perl::Tidy )) { diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidySweet.pm b/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidySweet.pm index d59f8d38..553c2cd5 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidySweet.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/PerlTidySweet.pm @@ -3,7 +3,7 @@ package TestFor::Code::TidyAll::Plugin::PerlTidySweet; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Perl::Tidy::Sweetened )) { diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/PodChecker.pm b/t/lib/TestFor/Code/TidyAll/Plugin/PodChecker.pm index 3c0c4c55..88bbe4ac 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/PodChecker.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/PodChecker.pm @@ -3,7 +3,7 @@ package TestFor::Code::TidyAll::Plugin::PodChecker; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Pod::Checker )) { diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/PodSpell.pm b/t/lib/TestFor/Code/TidyAll/Plugin/PodSpell.pm index d82f3226..883947ea 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/PodSpell.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/PodSpell.pm @@ -3,7 +3,7 @@ package TestFor::Code::TidyAll::Plugin::PodSpell; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Pod::Spell )) { diff --git a/t/lib/TestFor/Code/TidyAll/Plugin/PodTidy.pm b/t/lib/TestFor/Code/TidyAll/Plugin/PodTidy.pm index 3e6a0419..c4eb7d51 100644 --- a/t/lib/TestFor/Code/TidyAll/Plugin/PodTidy.pm +++ b/t/lib/TestFor/Code/TidyAll/Plugin/PodTidy.pm @@ -3,7 +3,7 @@ package TestFor::Code::TidyAll::Plugin::PodTidy; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; use Module::Runtime qw( require_module ); -use Try::Tiny; +use Try::Tiny qw( try ); BEGIN { for my $mod (qw( Pod::Tidy )) { diff --git a/t/lib/TestFor/Code/TidyAll/SVN.pm b/t/lib/TestFor/Code/TidyAll/SVN.pm index d0e1ca40..69fe5e10 100644 --- a/t/lib/TestFor/Code/TidyAll/SVN.pm +++ b/t/lib/TestFor/Code/TidyAll/SVN.pm @@ -1,12 +1,12 @@ package TestFor::Code::TidyAll::SVN; -use Capture::Tiny qw(capture_stdout capture_stderr capture); +use Capture::Tiny qw( capture_stderr capture_stdout ); use Code::TidyAll::SVN::Precommit; -use Code::TidyAll::SVN::Util qw(svn_uncommitted_files); -use Code::TidyAll::Util qw(tempdir_simple); -use Code::TidyAll; -use IPC::System::Simple qw(run); -use Path::Tiny qw(path); +use Code::TidyAll::SVN::Util qw( svn_uncommitted_files ); +use Code::TidyAll::Util qw( tempdir_simple ); +use Code::TidyAll (); +use IPC::System::Simple qw( run ); +use Path::Tiny qw( path ); use Test::Class::Most parent => 'TestHelper::Test::Class'; my ( $precommit_hook_template, $tidyall_ini_template ); diff --git a/t/lib/TestFor/Code/TidyAll/SpacesInPaths.pm b/t/lib/TestFor/Code/TidyAll/SpacesInPaths.pm index f2362632..c90aab78 100644 --- a/t/lib/TestFor/Code/TidyAll/SpacesInPaths.pm +++ b/t/lib/TestFor/Code/TidyAll/SpacesInPaths.pm @@ -5,11 +5,10 @@ use warnings; use Test::Class::Most parent => 'TestFor::Code::TidyAll::Plugin'; -use Code::TidyAll::Plugin::PerlCritic; -use Code::TidyAll::Util qw(tempdir_simple); -use Module::Runtime qw( require_module ); -use Path::Tiny qw( cwd ); -use Try::Tiny; +use Code::TidyAll::Plugin::PerlCritic (); +use Module::Runtime qw( require_module ); +use Path::Tiny qw( cwd ); +use Try::Tiny qw( try ); BEGIN { my @mods diff --git a/t/lib/TestFor/Code/TidyAll/Util.pm b/t/lib/TestFor/Code/TidyAll/Util.pm index 25e3154b..674ed5aa 100644 --- a/t/lib/TestFor/Code/TidyAll/Util.pm +++ b/t/lib/TestFor/Code/TidyAll/Util.pm @@ -1,7 +1,7 @@ package TestFor::Code::TidyAll::Util; -use Code::TidyAll::Util qw(tempdir_simple); -use Path::Tiny; +use Code::TidyAll::Util qw( tempdir_simple ); +use Path::Tiny qw( path ); use Test::Class::Most parent => 'TestHelper::Test::Class'; sub test_tempdir_simple : Tests { diff --git a/t/lib/TestFor/Code/TidyAll/Util/Zglob.pm b/t/lib/TestFor/Code/TidyAll/Util/Zglob.pm index 1bd19ae9..1802c057 100644 --- a/t/lib/TestFor/Code/TidyAll/Util/Zglob.pm +++ b/t/lib/TestFor/Code/TidyAll/Util/Zglob.pm @@ -1,7 +1,7 @@ package TestFor::Code::TidyAll::Util::Zglob; use Test::Class::Most parent => 'TestHelper::Test::Class'; -use Code::TidyAll::Util::Zglob qw(zglob_to_regex); +use Code::TidyAll::Util::Zglob qw( zglob_to_regex ); sub test_match : Tests { my ( $zglob, $regex ); diff --git a/t/lib/TestHelper/Plugin/ReverseFoo.pm b/t/lib/TestHelper/Plugin/ReverseFoo.pm index d00164da..4ce74fb6 100644 --- a/t/lib/TestHelper/Plugin/ReverseFoo.pm +++ b/t/lib/TestHelper/Plugin/ReverseFoo.pm @@ -1,6 +1,5 @@ package TestHelper::Plugin::ReverseFoo; -use Path::Tiny qw(path); use Moo; extends 'Code::TidyAll::Plugin'; diff --git a/t/lib/TestHelper/Test/Class.pm b/t/lib/TestHelper/Test/Class.pm index 4009c62b..09d2a5ef 100644 --- a/t/lib/TestHelper/Test/Class.pm +++ b/t/lib/TestHelper/Test/Class.pm @@ -1,9 +1,9 @@ package TestHelper::Test::Class; -use Capture::Tiny qw(capture_stdout); -use Code::TidyAll; -use Code::TidyAll::Util qw(tempdir_simple); -use File::Which qw(which); +use Capture::Tiny qw( capture_stdout ); +use Code::TidyAll (); +use Code::TidyAll::Util qw( tempdir_simple ); +use File::Which qw( which ); use Test::Class::Most; use strict; use warnings; diff --git a/t/parallel.t b/t/parallel.t index 8a84787b..f1ceadc8 100644 --- a/t/parallel.t +++ b/t/parallel.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::Parallel; +use TestFor::Code::TidyAll::Parallel (); TestFor::Code::TidyAll::Parallel->runtests; diff --git a/t/spaces-in-paths.t b/t/spaces-in-paths.t index c3c96929..8a56b281 100644 --- a/t/spaces-in-paths.t +++ b/t/spaces-in-paths.t @@ -1,4 +1,4 @@ #!/usr/bin/perl use lib::relative 'lib'; -use TestFor::Code::TidyAll::SpacesInPaths; +use TestFor::Code::TidyAll::SpacesInPaths (); TestFor::Code::TidyAll::SpacesInPaths->runtests; diff --git a/xt/author/self-tidyall.t b/xt/author/self-tidyall.t index c788d501..f5dddcd3 100644 --- a/xt/author/self-tidyall.t +++ b/xt/author/self-tidyall.t @@ -1,7 +1,7 @@ use strict; use warnings; -use Test::Code::TidyAll; +use Test::Code::TidyAll qw( tidyall_ok ); use Test::More; plan skip_all => q{This is broken because of tidyall's broken UTF-8 handling. This is because we now have a contributor in Git with a UTF-8 character in their name, and this gets mangled during tidying. Oh, the irony.}; diff --git a/xt/author/tidy-and-critic.t b/xt/author/tidy-and-critic.t index 2a40ffc4..2858932c 100644 --- a/xt/author/tidy-and-critic.t +++ b/xt/author/tidy-and-critic.t @@ -1,10 +1,9 @@ #!/usr/bin/perl use lib::relative 'lib'; -use Code::TidyAll::Util qw(tempdir_simple); -use Code::TidyAll; -use Path::Tiny qw(path); +use Code::TidyAll::Util qw( tempdir_simple ); +use Code::TidyAll (); use Test::More; -use Capture::Tiny qw(capture_merged); +use Capture::Tiny qw( capture_merged ); my $root_dir = tempdir_simple();