Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Checking and installing a perl module

by linuxer (Curate)
on Jun 11, 2009 at 12:05 UTC ( [id://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?
Username:
Password:

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

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

    No recent polls found