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

Well, I've got my very own Linux machine running now and I'm quite proud. In fact, I'm writing this from my Linux machine. Now I'm ready to get back into Perl and programming with a "real" machine.

My Debian distro, however, came with Perl 5.005. I want to leave 5.005 on there and install 5.6.1. I'm going to attempt to build 5.6.1 from the source and put it in /usr/local. I've already untarred an unzipped it and perused the INSTALL readme file but being a Linux newbie and not very familiar with the guts of Perl, I was pretty lost.

If someone who has created such a "dual-boot" Perl system on Linux, I sure would appreciate hearing from you. How can I install 5.6.1 so it can co-exist peacefully with 5.005?

$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop";
$nysus = $PM . $MCF;
Click here if you love Perl Monks

Replies are listed 'Best First'.
Re: 'Dual-boot' Perl
by busunsl (Vicar) on Aug 27, 2001 at 23:45 UTC
    It will coexist out of the box.
    Remember this is Linux!

    Version 5.6.1 will be the default after the installation.
    I.e. /usr/bin/perl will be a link to version 5.6.1.

    There should also be a /usr/bin/perl5.005.

    You will have to patch the shebang in your scripts accordingly.

    The only problem I experienced was with perldoc, but with shifting a link everything was fine.

Re: 'Dual-boot' Perl
by unixdown (Scribe) on Aug 27, 2001 at 23:46 UTC
    The INSTALL file has directions for this.
    By default, for most systems, perl will be installed in /usr/local/{bin, lib, man}. (See L<"Installation Directories"> and L<"Coexistence with earlier versions of perl5"> below for further details.)

    You can specify a different 'prefix' for the default installation directory, when Configure prompts you or by using the Configure command line option -Dprefix='/some/directory', e.g.

    sh Configure -Dprefix=/opt/perl

    If your prefix contains the string "perl", then the suggested directory structure is simplified. For example, if you use prefix=/opt/perl, then Configure will suggest /opt/perl/lib instead of /opt/perl/lib/perl5/. Again, see L<"Installation Directories"> below for more details.

    NOTE: You must not specify an installation directory that is the same as or below your perl source directory. If you do, installperl will attempt infinite recursion.

Re: 'Dual-boot' Perl
by dlc (Acolyte) on Aug 27, 2001 at 23:47 UTC

    Multiple Perls is straightforward, provided you have a separate place to put them. I use /usr/local/perl/$VERSION to keep Perls (I have a 5.00503, 5.6.0, and 5.6.1 there). By default, most *nix use /usr for a base directory for Perl. When Configure asks you what you want to use a base directory, be sure to use something other than /usr, and you wont clobber your Debian install. Proceed per the instructions.

    Be sure to invoke your new perl specifically by full path, or set PATH in such a way that it finds your new Perl first.

    That's all there is to it.

Re: 'Dual-boot' Perl
by seesik (Initiate) on Aug 27, 2001 at 23:43 UTC
    i work with clients that tend to take MONTHS for module installations, so i've been installing everything in my ~. just pass ./configure a --PREFIX=~/$wherever (even w/ -d), export PATH=~/wherever/bin:$PATH in your profile, and you're done. all modules get thrown in the ~/$wherever/lib hierarchy. i'm not sure if this is what you meant by 'co-exist', but it gives you independent perl installations; symlinks can always take care of any naming/path convention problems for ya. hth.
Re: 'Dual-boot' Perl
by Cine (Friar) on Aug 28, 2001 at 00:00 UTC
    Or you could just pull perl from debian Testing, which is 5.6.1 ;)

    T I M T O W T D I
Re: 'Dual-boot' Perl
by Anonymous Monk on Aug 28, 2001 at 07:13 UTC
    all you have to do, i had this running for awhile is compile ther perl source, which is better and way, then u have the new perl exe that u can put and run anywhere, its alot simpilar then what they said. kungfoo guru
      Make sure you use the stable version of 5.6.1. I made the mistake of not using the stable version. Things worked fine until I needed to use LWP::Simple. Stay away from the bleeding edge...