Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Checking and installing a perl module

by linuxer (Deacon)
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?


Comment on Re: Checking and installing a perl module
Download Code
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
Node Status?
node history
Node Type: note [id://770620]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2014-08-30 06:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (291 votes), past polls