2007fld has asked for the wisdom of the Perl Monks concerning the following question:

I have one server installed with Perl 5.10, and another server installed with Perl 5.8. I'm root on the first server, but non-root on the second one. Now I need to have Perl 5.10 on the second server. Since I'm not a root on the server, I'm thinking to have Perl installed under my home directory.

One possible option is: Tar up Perl 5.10 on the first server box and put/install it under my home directory on the second server. I'll fix the env. variables in my profile. But the question is: Will copying everything under /usr/lib/perl5 good enough?

Or Is it possible to install Perl 5.10 as non-root under my home directory?

Which option is doable? Thanks a lot!

Replies are listed 'Best First'.
Re: How to bundle up a Perl Install
by Corion (Patriarch) on Dec 29, 2010 at 19:41 UTC

    I recommend doing a local install of the same Perl version you use for development. Compiling and installing your own Perl isn't that hard, see the INSTALL file for what you need to do.

    Using local::lib is another alternative if you want to use the available Perl.

    Copying a Perl installation is unlikely to work, if you don't have a relocatable Perl (you don't on unixish operating systems) and also are sure that all non-Perl libraries are available on the target machine (also unlikely).

      if you don't have a relocatable Perl (you don't on unixish operating systems)

      In theory, as of Perl 5.10, you can have a relocatable Perl even on Unix, if you configure it with -Duserelocatableinc.  Most distros don't compile their perls that way, though...

Re: How to bundle up a Perl Install
by JavaFan (Canon) on Dec 29, 2010 at 20:09 UTC
    Or Is it possible to install Perl 5.10 as non-root under my home directory?
    Most certainly! Perl does not require it's installed as root (I usually install Perl using a dedicated uid), nor does it require any specific place to be installed.

    Just download the tarball, unpack it, run ./Configure -des -Dprefix=/path/to/install/location && make && make test && make install, have a cup of coffee, and you're all set. (Just make sure /path/to/install/location exists by the time make install runs).

Re: How to bundle up a Perl Install
by Marshall (Canon) on Dec 29, 2010 at 19:50 UTC
    You didn't mention it, but there is a third option, instead of "install Perl 5.8 as non-root under my home directory?". Continue to use the Perl 5.8 on the second machine and make your own personal library of extra modules that you need. I did this a couple of months ago. I started with don't have permission?. And wound up doing things a bit differently as described at: deviations to cpan installation in the tutorial.

    It is possible to install Perl 5.10 as a user (I've had more than one Perl version on my Windows machine before). This was more complicated than copying a directory. I did the installation process.

Re: How to bundle up a Perl Install
by nxadm (Novice) on Dec 30, 2010 at 12:23 UTC