Comments (2)
Applied. Thank.s
from test-perl-critic.
Hi @petdance. The following resolves the issue. Also, added missing line in _test_serial.
--- Test/Perl/Critic.pm 2017-07-04 12:01:15.421579849 -0500
+++ Test/Perl/Critic.pm.fix 2017-11-21 21:30:50.478096779 -0600
@@ -92,7 +92,7 @@
my @files = Perl::Critic::Utils::all_perl_files(@dirs_or_files);
croak 'Nothing to critique' if not @files;
- my $have_mce = eval {require MCE::Grep};
+ my $have_mce = eval { require MCE::Grep; MCE::Grep->import; 1 };
return $have_mce ? _test_parallel(@files) : _test_serial(@files);
}
@@ -109,13 +109,15 @@
# workers. So we disable the T::B sanity checks at the end of its life.
$TEST->no_ending(1);
- my $okays = MCE::Grep::mce_grep { critic_ok($_) } @files;
+ my $okays = MCE::Grep->run( sub { critic_ok($_) }, @files );
my $pass = $okays == @files;
# To make Test::Harness happy, we must emit a test plan and a sensible exit
# status. Usually, T::B does this for us, but we disabled the ending above.
$pass || eval 'END { $? = 1 }'; ## no critic qw(Eval Interpolation)
- return $TEST->done_testing(scalar @files);
+ $TEST->done_testing(scalar @files);
+
+ return $pass;
}
#---------------------------------------------------------------------------
@@ -126,6 +128,8 @@
my $okays = grep {critic_ok($_)} @files;
my $pass = $okays == @files;
+ $TEST->done_testing(scalar @files);
+
return $pass;
}
I tested Test-Perl-Critic without and with MCE 1.827 through 1.832.
from test-perl-critic.
Related Issues (11)
- Please make the MCE dependency optional HOT 12
- Perl::Critic being instantiated for each file is very slow HOT 2
- Support external perlcritic command? HOT 2
- wishlist: Option to allow excluding some files HOT 1
- Test::Builder needs to be at least version 0.88
- Fresh install fails to install PPI because of missing File::Remove dependency HOT 2
- [libtest-perl-critic-perl] lintian FTBFS with new version HOT 5
- should require newer version of MCE HOT 1
- Issues link in POD is wrong HOT 3
- Wishlist: better use of PPI::Cache
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-perl-critic.