Link to home
Start Free TrialLog in
Avatar of YUGA255
YUGA255

asked on

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
Avatar of WeiXi
WeiXi
Flag of Austria image

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

Avatar of YUGA255
YUGA255

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of WeiXi
WeiXi
Flag of Austria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial