You can use CPAN to make an autobundle of all the modules installed in your original ( current) perl build. Or you can try Module::Dependency from CPAN to get a list of file dependancies. You might also look into CPANPLUS as an option if you're able to build on a machine with internet access. CPANPLUS makes it easy to install modules with many dependancies.
You need to specify all of these on the command like when performing a manual build ( perl Makefile.PL PREFIX=...).Most modules only need a few of these but I've found that some will need different ones so I set them all:
This is documented in perlmodinstallPREFIX=$PREFIX \ INSTALLPRIVLIB=$PREFIX/lib/perl5 \ INSTALLSCRIPT=$PREFIX/bin \ INSTALLSITELIB=$PREFIX/lib/perl5/site_perl \ INSTALLBIN=$PREFIX/bin \ INSTALLMAN1DIR=$PREFIX/lib/perl5/man \ INSTALLMAN3DIR=$PREFIX/lib/perl5/man/man3
I actually keep that snippet in a shell script, like this:
So that $HOME and $PREFIX will be interpreted and then I do: perl Makefile.PL `localperl.sh`#!/bin/sh export PREFIX=$HOME/usr/local echo PREFIX=$HOME/usr/local \ INSTALLPRIVLIB=$PREFIX/lib/perl5 \ INSTALLSCRIPT=$PREFIX/bin \ INSTALLSITELIB=$PREFIX/lib/perl5/site_perl \ INSTALLBIN=$PREFIX/bin \ INSTALLMAN1DIR=$PREFIX/lib/perl5/man \ INSTALLMAN3DIR=$PREFIX/lib/perl5/man/man3
Or CPANPLUS will let you setup these variables in its configuration if you decide to go that route.
You should be able to just copy the top level directory to another machine provide the architechures and perl builds are identical or if they are all pure perl modules.
You can edit an environment variable called PERL5LIB. Directories added here will automatically be added to @INC in all of your scripts.
It is documented in perlrun
These are techniques that have worked for me, your mileage may vary.
--In reply to Re: Bundling Several Modules and their dependents
by clscott
in thread Bundling Several Modules and their dependents
by freddo411
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |