Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Can ExtUtils::MakeMaker recommend to install optional modules?

by Dallaylaen (Chaplain)
on Nov 30, 2017 at 23:57 UTC ( [id://1204638]=note: print w/replies, xml ) Need Help??


in reply to Can ExtUtils::MakeMaker recommend to install optional modules?

This article sums up dependencies pretty well.

Here's how you specify recommended/suggested dependencies:

use ExtUtils::MakeMaker 6.64; WriteMakefile( # other stuff META_MERGE => { "meta-spec" => { version => 2 }, prereqs => { test => { recommends => { 'CPAN::Meta' => '2.120900', }, }, runtime => { recommends => { 'Text::CSV_XS' => 0, }, }, }, }, );
  • Comment on Re: Can ExtUtils::MakeMaker recommend to install optional modules?
  • Download Code

Replies are listed 'Best First'.
Re^2: Can ExtUtils::MakeMaker recommend to install optional modules?
by 1nickt (Canon) on Dec 01, 2017 at 12:44 UTC

    Here's how you specify recommended/suggested dependencies:

    For the record: there is a difference between recommends and suggests.

    The two (and requires and conflicts) exist so the module author has more control over, well, recommendations and suggestions. Not all versions of all clients support the newest spec, but recent ones do.

    Hope this helps!


    The way forward always starts with a minimal test.
Re^2: Can ExtUtils::MakeMaker recommend to install optional modules?
by Anonymous Monk on Jan 13, 2018 at 13:27 UTC
    What if I don't want the recommended additional packages? How can I force the build to ignore the recommends? In my case a command line tool recommends, through a chain of dependencies, that I install the X server. I really don't want to do that.

      Default cpan client has recommends_policy and suggests_policy options under o conf just for that. Couldn't find anything in cpanm, but maybe it can, too. No idea about cpanplus.

      Btw installing raw CPAN on perlbrew was nontrivial, though not complicated after all. Maybe brew should bundle a script for that...

        --with-recommends, --with-suggests EXPERIMENTAL: Installs dependencies declared as recommends and suggest +s respectively, per META spec. When these dependencies fail to instal +l, cpanm continues the installation, since they're just recommendatio +n/suggestion. Enabling this could potentially make a circular dependency for a few m +odules on CPAN, when recommends adds a module that recommends back th +e module in return. There's also --without-recommend and --without-suggests to override th +e default decision made earlier in PERL_CPANM_OPT. Defaults to false for both.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1204638]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found