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

Can ExtUtils::MakeMaker recommend to install optional modules?

by voj (Acolyte)
on Dec 08, 2011 at 11:04 UTC ( #942397=perlquestion: print w/ replies, xml ) Need Help??
voj has asked for the wisdom of the Perl Monks concerning the following question:

In ExtUtils::MakeMaker you specify required modules in PREREQ_PM. I have a module that recommends the GraphViz module but it can also be installed without. Can I somehow add a rule to Makefile.PL that triggers an attempt to install GraphViz? So if you have already installed the graphviz binary (which is needed by GraphViz module), installation of my module should also install GraphViz. But if this fails, because of missing graphviz binary, you should only get a message.

Comment on Can ExtUtils::MakeMaker recommend to install optional modules?
Re: Can ExtUtils::MakeMaker recommend to install optional modules?
by Anonymous Monk on Dec 08, 2011 at 13:15 UTC

    No.

    If you're using any of cpan/cpanp/cpanm... they will notice what MakeMaker says, and attempt to install the prerequisites

    You can use ExtUtils::AutoInstall - Automatic install of dependencies via CPAN

    or Module::AutoInstall - Automatic install of dependencies via CPAN

      yes! http://grokbase.com/t/perl.org/module-authors/2009/10/how-can-i-tell-makemaker-to-insert-recommended-modules-into-meta-yml/16vuqyqk4yiugwsm43ttanhirbry

        yes!...

        That has nothing to do with the question asked. META is generated from PREREQ_PM. MakeMaker doesn't download modules, cpan does.

Re: Can ExtUtils::MakeMaker recommend to install optional modules?
by DrHyde (Prior) on Dec 09, 2011 at 11:50 UTC
    ... PREREQ_PM => { ... (`which graphviz`) ? (GraphViz => '2.08') : ()) }, ...

    Adapt as required to make it portable :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://942397]
Approved by marto
Front-paged by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2014-08-28 00:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (253 votes), past polls