Solved

How to install perl packages programatically

Posted on 2009-04-02
4
234 Views
Last Modified: 2012-05-06
HI,
i need to install some packages to run my perl script.
how to install these perl packages programatically using perl script
0
Comment
Question by:YUGA255
  • 2
4 Comments
 
LVL 3

Expert Comment

by:WeiXi
Comment Utility
That depends on the installation mechanism you are using. I dare say, that CPAN is most widely used, but ActivePerl, for instance, comes with its own module installation mechanism.

For CPAN use this module (see code snippet below):
http://search.cpan.org/~andk/CPAN-1.9304/lib/CPAN.pm

Note: Depending on the system and how perl is set up, the installation of perl modules might require root/admin-rights.
use CPAN;

CPAN::Shell->install("Acme::Meta");

CPAN::Shell->install("NWCLARK/Acme-Meta-0.02.tar.gz");

Open in new window

0
 

Author Comment

by:YUGA255
Comment Utility
Actually my requirement is like this,
actually i have to install some perl packages in a server system,but that server system does not have internet connection.
i have all the .tar.gz files of the required packages.
i need something like when i run a perl script it has to install all the .tar.gz what all are .tar.gz files i provided.
0
 
LVL 3

Accepted Solution

by:
WeiXi earned 500 total points
Comment Utility
Then
> use CPAN;
> CPAN::Shell->install("NWCLARK/Acme-Meta-0.02.tar.gz");
should do the job for you.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now