Jenn G. <practicalp...@gmail.com> asked: > We have a project which has 30+ perl/modperl modules. > Installing those modules by hand on each host is wasting time. > So can we just copy the directory "/usr/lib/perl5/" from the already > installed host to any other not installed hosts? > > We use Linux OS, perl version is 5.8.8.
That sounds like a recipe for disaster. Some possibilities: 1) You could use the autobundle function of CPAN.pm: perl -MCPAN -e autobundle This will create a listing of all currently installed modules on your system. You can then copy that list to your target systems and do perl -MCPAN -e 'install Bundle::Snapshot_<snapshot_date_time> which will do a more or less automated install of all missing modules. Pro: Should work fine for different architectures and OS releases/patchlevels Con: Slow. Might install a different Perl version on your system (ouch!), unless you edit the packlist afterwards. That would require you knowing what you need module-wise, though. 2) If your project is a single executable and the target systems are all of the same architecture, you could use PAR to generate a standalone application. Pro: Easy to deploy - just copy one file. Doesn't mess with the distro's Perl installation. Con: Not so easy to create if you have external dependencies to certain libs etc. PAR archive is architecture/OS release specific. 3) If you have multiple executables, then "Roll your own Perl" might be an option. Create a package subdirectory under /opt and install your own Perl in /opt/yourpackage/bin with the the corresponding modules in /opt/yourpackage/lib. To distribute, simply copy /opt/yourpackage to the target systems. Pro: Doesn't mess with the distro's Perl installation. Incremental update capability using rsync ;-) Con: executables have to be fixed to call the proper Perl interpreter. Package is architecture/OS release specific. 4) If you're using Debian or a distro derived from it, you could use dh-make-perl to package the required modules that are not available from the distro itself. For deployment, you'd need a simple installer script that would load the required modules from a repository or the packages that you've made. The deluxe version would be to package your application itself; listing the required packages as dependencies. Pro: Clean integration into the distro's package management. Dependencies can be detected and installed if necessary. Depending on how professional you want to get you can keep your own repository woth multiple package versions around. Ideally installation could be automated to a simple "apt-get install xxx" on the target system if you package your application and use repository for your packages. Con: Package management takes some time to learn. Can be tricky to set up for multiple architectures. Requires some effort to maintain the module packages. HTH, Thomas -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/