• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • Last Modified:

How to install perl packages programatically

HI,
i need to install some packages to run my perl script.
how to install these perl packages programatically using perl script
0
YUGA255
Asked:
YUGA255
  • 2
1 Solution
 
WeiXiCommented:
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
 
YUGA255Author Commented:
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
 
WeiXiCommented:
Then
> use CPAN;
> CPAN::Shell->install("NWCLARK/Acme-Meta-0.02.tar.gz");
should do the job for you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now