Code Monkey home page Code Monkey logo

Comments (12)

thaljef avatar thaljef commented on June 24, 2024

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.

karenetheridge avatar karenetheridge commented on June 24, 2024

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.

karenetheridge avatar karenetheridge commented on June 24, 2024

PS CPAN.pm does default to installing recommendations.

from test-perl-critic.

thaljef avatar thaljef commented on June 24, 2024

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.

karenetheridge avatar karenetheridge commented on June 24, 2024

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.

thaljef avatar thaljef commented on June 24, 2024

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.

karenetheridge avatar karenetheridge commented on June 24, 2024

we can help on #toolchain :)

from test-perl-critic.

marioroy avatar marioroy commented on June 24, 2024

++ for adding the MCE prereq to 'recommends' instead of 'requires'

from test-perl-critic.

karenetheridge avatar karenetheridge commented on June 24, 2024

from test-perl-critic.

marioroy avatar marioroy commented on June 24, 2024

Thank you. I had mistakenly mis-diagnosed an email reply on issue #707.

from test-perl-critic.

petdance avatar petdance commented on June 24, 2024

I'm certainly in favor of moving back to vanilla Makemaker. If I do that, I'll make MCE optional.

from test-perl-critic.

iynehz avatar iynehz commented on June 24, 2024

++

from test-perl-critic.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.