Currently, I got an entire collection of perl modules I have to install on a machine that have no access to the internet, so I cannot use CPAN with a bundlestyle module.
These modules are tarballs in a directory. How can I write a little perl program to install all of them ? The order of installation is given in a file.
Can I use the CPAN module to achieve that ? or do I need to do 'tar xzf - ; cd - ; perl Makefile.PL ; make ; make test ; make install ; cd .. ' within an horrible shell command ?
Thanx for your lights.-- Nice photos of naked perl sources here !
See ExtUtils::Install , ExtUtils::Installed
perl Makefile.PL make make test make installis much better method.
While it's not the answer to the question you asked, per se, on the topic of offline installation of perl modules, CPAN can take a file: URL for offline installation. The catch is that the distributions must be in directories structured like CPAN and with the kind of index that CPAN uses.
For that, you might want to explore CPAN::Mini, which gives you a local mirror of a subset of CPAN which is fairly compact (e.g. CD-ROM or USB-key sized). CPAN::Mini::Inject allows you to add your own distributions to that mirror if you need them.
-xdg
Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
Can I use the CPAN module to achieve that ? or do I need to do 'tar xzf - ; cd - ; perl Makefile.PL ; make ; make test ; make install ; cd .. ' within an horrible shell command ?
At the very worst you can conjure up a quick shell or perl script to do that for every module:
$ for m in *.tar.gs; do what; I; want; to $m; done
While CPAN::Mini looks like to do the same thing (and easier, but I need to test it before telling!) you can do the following:
perlmonks.org content © perlmonks.org and blazar, glasswalk3r, jeteve, svenXY, vishi83, xdg
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03