Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Checking and installing a perl module

by linuxer (Curate)
on Jun 11, 2009 at 12:05 UTC ( #770620=note: print w/replies, xml ) Need Help??

in reply to Checking and installing a perl module

You could eval a use of the desired module and check $@ afterwards.

How do you want to install the module? With CPAN? With system's package system?

I'd prefer that the script aborts with an information for the user, if the module is not installed. Let the user handle the installation of modules. Best of all, this already happens when using a not installed module.

Don't mess up the system installation ... How do you know the user's preferences where to install which modules?

Replies are listed 'Best First'.
Re^2: Checking and installing a perl module
by Anonymous Monk on Jun 11, 2009 at 12:09 UTC
    No I will check for only one Module....I will run my script in different machines....If the module is not installed, then the script should install it.....
      Are there underlying (and self-evidently, unstated) reason(s) why you don't use NFS mounted extra libraries ??

      In that way, you remove the need to maintain libraries across a load of disparate machines (and installations) with all the attendant problems - at least one of which, you've now encountered.

      A user level that continues to overstate my experience :-))

        Off the top of my head, reasons why I might not want to use NFS mounted extra libraries.

        • Network latency. The dreaded slow NFS mount problem. Added program startup penalty.
        • NFS mount goes away. Whoops. Now your program won't compile.
        • Perhaps you don't want the exact same module version on every host.

        -- vek --

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://770620]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2018-05-21 09:50 GMT
Find Nodes?
    Voting Booth?