Comments (12)
As I recall, the toolchain does not install recommended modules by default. I would prefer to have an opt-out instead of opt-in. So MCE would be required, unless you explicitly say you don't want it.
Would that be acceptable?
from test-perl-critic.
So MCE would be required, unless you explicitly say you don't want it.
I guess that depends on how you propose to implement that.
from test-perl-critic.
PS CPAN.pm does default to installing recommendations.
from test-perl-critic.
I guess that depends on how you propose to implement that.
Probably as a Build.PL
command line option, with an environment variable hook. Other suggestions?
CPAN.pm does default to installing recommendations.
I didn't know that. Thanks for educating me. But cpanm
still does not.
from test-perl-critic.
This is the canonical way to handle optional features with prompts:
in Makefile.PL:
my %WriteMakefileArgs = (
...
);
WriteMakefileArgs{PREREQ_PM}{'MCE'} = '0'
if $ENV{PERL_MM_USE_DEFAULT} or prompt("install MCE (to allow parallelized tests)? [Y/n]", 'Y') =~ /^y/i;
WriteMakefileArgs{META_MERGE}{optional_features}{'parallel_testing'} = {
description => 'parallel tests',
prereqs => { runtime => { requires => { 'MCE' => '0' } } },
x_default => 1,
};
WriteMakefile(%WriteMakefileArgs);
This will add the extra prereq unless the user specifically said 'no' to the
prompt (and in non-interactive installs, it defaults to 'yes').
I don't know how to do meta merging in Module::Build, but I wouldn't ever
recommend using MB anyway unless you really needed to (e.g. in an Alien dist).
from test-perl-critic.
This is the canonical way to handle optional features with prompts:
Thanks for that.
MB was a decision we made long ago, when MB was more fashionable. I could probably switch Test::Perl::Critic to EU::MM in the near future, but Perl::Critic itself will be harder to migrate.
from test-perl-critic.
we can help on #toolchain :)
from test-perl-critic.
++ for adding the MCE prereq to 'recommends' instead of 'requires'
from test-perl-critic.
from test-perl-critic.
Thank you. I had mistakenly mis-diagnosed an email reply on issue #707.
from test-perl-critic.
I'm certainly in favor of moving back to vanilla Makemaker. If I do that, I'll make MCE optional.
from test-perl-critic.
++
from test-perl-critic.
Related Issues (11)
- 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
- critic_ok() in xt/96_perlcritic.t doesn't work with MCE running HOT 2
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.