in reply to installing Perl 5.10 on Debian

Do not "upgrade" your system Perl. It belongs to the system and many system tools rely on it. You will break, for instance, apt-get by "upgrading" your system Perl to Perl 5.10, if you don't take speical care.

For your personal needs/applications, I recommend compiling your own version of Perl, and configuring it to use /opt/perl as its base directory. I keep various versions of Perl there. See the README file of the Perl distribution for how to do a local installation of Perl. The incantation there is all you nee.

I created a perl usergroup and added my user into it. That usergroup has all rights to /opt/perl and thus I can install new modules via CPAN there without needing to switch to root.

There is a downside to this approach - you can't use the Debian packaging environment anymore. But if you need stuff outside of Debian, it's best to avoid the Debian packaging for that. All OS packaging mechanisms are all-or-nothing in my opinion - either you exclusively use them or it's better to avoid them alltogether. Personally, I install the "third party" libraries like libxml2 etc. through the Debian mechanism, but compile my modules for my 5.10 myself using cpan. I also install the Perl libraries for the stock Perl, but only through the Debian mechanism.

Replies are listed 'Best First'.
Re^2: installing Perl 5.10 on Debian
by John M. Dlugosz (Monsignor) on Jun 11, 2008 at 18:46 UTC
    Hmm, with all the testing I would think that 5.10 would not break anything!

    It looks like ActiveState's deb package will install under /opt. So, I guess I control which Perl gets used via the PATH variable? I'm specifically interested in mod_perl and CGI under Apache.

    —John

      I'm not sure what you mean by "With all the testing". If (for example) the Debian stock perl comes with some XS extensions, the new Perl 5.10 won't pick up these, now matter how much testing. Likewise, custom patches that Debian applies to Perl for magic locations etc.

      If you want to use a Perl version for mod_perl, you need to compile mod_perl with/for the appropriate version. You should be expicit about which Perl your scripts use with the hashbang line and by using absolute paths.</c>