Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask

Re^4: Programmatically installing modules

by morgon (Deacon)
on Dec 23, 2013 at 11:02 UTC ( #1068175=note: print w/ replies, xml ) Need Help??

in reply to Re^3: Programmatically installing modules
in thread Programmatically installing modules

Yes that is why I do a require first and only when that fails I do the install.

So when I have the module the require succeeds and I do not run the install.

Comment on Re^4: Programmatically installing modules
Replies are listed 'Best First'.
Re^5: Programmatically installing modules
by LanX (Chancellor) on Dec 23, 2013 at 11:09 UTC
    And how do you check if the already installed module has the correct version? :)

    sudo cpan -D List::Util CPAN: Storable loaded ok (v2.21) Going to read '/home/lanx/.cpan/Metadata' Database was generated on Wed, 18 Dec 2013 18:41:02 GMT List::Util ---------------------------------------------------------------------- +--- List utilities (eg min, max, reduce) P/PE/PEVANS/Scalar-List-Utils-1.35.tar.gz /usr/local/lib/perl/5.10.0/List/ Installed: 1.22 CPAN: 1.35 Not up to date Graham Barr (GBARR)

    Cheers Rolf

    ( addicted to the Perl Programming Language)

      Well this is really just a hack and for the time being I don't care about version.

      Detecting that a module is installed is good enough.

      I grant you that it is not the cleanest, but my problem is that I want to automate the installation of some third-party software that does not explicitely lists dependencies on particular versions.

      I can't do any better at the moment.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (12)
As of 2015-11-25 21:15 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (691 votes), past polls