From 8ec8da0491ad89604700b3e29a227966f6d84ba1 Mon Sep 17 00:00:00 2001 From: Perl Tidy Date: Wed, 5 Dec 2018 15:38:52 -0500 Subject: no bug - reformat all the code using the new perltidy rules --- t/Support/Files.pm | 60 ++++++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 29 deletions(-) (limited to 't/Support/Files.pm') diff --git a/t/Support/Files.pm b/t/Support/Files.pm index 603d95cf9..7142b11b9 100644 --- a/t/Support/Files.pm +++ b/t/Support/Files.pm @@ -17,56 +17,58 @@ use File::Find; our @additional_files = (); use constant IGNORE => qw( - Bugzilla/DuoAPI.pm - Bugzilla/DuoWeb.pm + Bugzilla/DuoAPI.pm + Bugzilla/DuoWeb.pm ); our @files = glob('*'); -find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, qw(Bugzilla docs)); +find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/; }, + qw(Bugzilla docs)); push(@files, 'extensions/create.pl', 'docs/makedocs.pl', 'cpanfile'); -our @extensions = - grep { $_ ne 'extensions/create.pl' && ! -e "$_/disabled" } - glob('extensions/*'); +our @extensions = grep { $_ ne 'extensions/create.pl' && !-e "$_/disabled" } + glob('extensions/*'); foreach my $extension (@extensions) { - find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/;}, $extension); + find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$|\.pl$/; }, + $extension); } our @test_files = glob('t/*.t xt/*/*.t'); foreach my $extension (@extensions) { - # Skip disabled extensions - next if -e "$extension/disabled"; - find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/;}, $extension); + # Skip disabled extensions + next if -e "$extension/disabled"; + + find(sub { push(@files, $File::Find::name) if $_ =~ /\.pm$/; }, $extension); } sub isTestingFile { - my ($file) = @_; - my $exclude; - - foreach my $ignore (IGNORE) { - return undef if $ignore eq $file; - } - - if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) { - return 1; - } - my $additional; - foreach $additional (@additional_files) { - if ($file eq $additional) { return 1; } - } - return undef; + my ($file) = @_; + my $exclude; + + foreach my $ignore (IGNORE) { + return undef if $ignore eq $file; + } + + if ($file =~ /\.psgi$|\.cgi$|\.pl$|\.pm$/) { + return 1; + } + my $additional; + foreach $additional (@additional_files) { + if ($file eq $additional) { return 1; } + } + return undef; } our (@testitems, @module_files); foreach my $currentfile (@files) { - if (isTestingFile($currentfile)) { - push(@testitems, $currentfile); - } - push(@module_files, $currentfile) if $currentfile =~ /\.pm$/; + if (isTestingFile($currentfile)) { + push(@testitems, $currentfile); + } + push(@module_files, $currentfile) if $currentfile =~ /\.pm$/; } 1; -- cgit v1.2.3-24-g4f1b