You've Come a Long Way, Baby.
We use a mix of RHEL 5.3 and CentOS 5.3 at work. We've been using Perl 5.8.8 since we moved to this OS from RHEL 4. We have talked about upgrading the version of Perl in the past but just now have the time to do so. After discussing it with the team, it was agreed that we would leave Perl 5.8.8 alone so that we did not have to muck with the OS at all. We are already putting our software into /opt so putting Perl there also makes sense (plenty of disk space to spare).
To get things started, I grabbed a list of our current 5.8.8 modules.
/usr/bin/perl -MExtUtils::Installed -e'print join("\n", new ExtUtils::Installed->modules)' > ~/module.list
I downloaded perlbrew and installed it to /opt/perl.
curl -LO http://xrl.us/perlbrew
chmod +x perlbrew
export PERLBREW_ROOT=/opt/perl
mkdir /opt/perl
chmod g+w /opt/perl
chgrp dev /opt/perl
./perlbrew install
I installed Perl 5.12.2 and cpanminus and tried installing Thread::Queue::Any.
perlbrew install perl-5.12.2
source /opt/perl/etc/bashrc
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm Thread::Queue::Any
At this point, I was told that I didn't have a threaded version of Perl. No big deal, I'll just rebuild.
perlbrew off
rm -rf /opt/perl/perls/perl-5.12.2
# Research how to install a threaded Perl with perlbrew. http://www.google.com/search?q=perlbrew+threaded
# The answer, use -D=, was found in the 3rd result: http://perl-howto.de/2010/07/appperlbrew-mehrere-perl-installationen-im-heimatverzeichnis.html
# I may have used more options than needed though. I pulled them from our 5.8.8 config.
perlbrew install perl-5.12.2 -D=usethreads -D=useithreads -D=uselargefiles
source /opt/perl/etc/bashrc
curl -L http://cpanmin.us | perl - App::cpanminus
cpanm `cat ~/module.list`
At this point, I was expecting something to fail. Nothing did though. Huzzah!
Next, I looked at the Perl modules that we were installing via RPMs: Class::Loader, Convert::PEM, Crypt::CBC, Crypt::DES, Crypt::DH, Crypt::IDEA, Crypt::Primes, Crypt::Random, Data::Buffer, Digest::MD2, Math::GMP, Math::Pari, Sort::Versions, Tie::EncryptedHash.
I installed those next also via cpanminus.
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Class::Loader
Fetching http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Class-Loader-2.03.tar.gz ... OK
Configuring Class-Loader-2.03 ... OK
Building and testing Class-Loader-2.03 for Class::Loader ... OK
Successfully installed Class-Loader-2.03
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Convert::PEM
Fetching http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Convert-PEM-0.07.tar.gz ... OK
Configuring Convert-PEM-0.07 ... OK
==> Found dependencies: Crypt::DES_EDE3, Convert::ASN1, Class::ErrorHandler
Fetching http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Crypt-DES_EDE3-0.01.tar.gz ... OK
Configuring Crypt-DES_EDE3-0.01 ... OK
==> Found dependencies: Crypt::DES
Fetching http://search.cpan.org/CPAN/authors/id/D/DP/DPARIS/Crypt-DES-2.05.tar.gz ... OK
Configuring Crypt-DES-2.05 ... OK
Building and testing Crypt-DES-2.05 for Crypt::DES ... OK
Successfully installed Crypt-DES-2.05
Building and testing Crypt::DES_EDE3 for Crypt::DES_EDE3 ... OK
Successfully installed Crypt::DES_EDE3
Fetching http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/Convert-ASN1-0.22.tar.gz ... OK
Configuring Convert-ASN1-0.22 ... OK
Building and testing Convert-ASN1-0.22 for Convert::ASN1 ... OK
Successfully installed Convert-ASN1-0.22
Fetching http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Class-ErrorHandler-0.01.tar.gz ... OK
Configuring Class-ErrorHandler-0.01 ... OK
Building and testing Class-ErrorHandler-0.01 for Class::ErrorHandler ... OK
Successfully installed Class-ErrorHandler-0.01
Building and testing Convert-PEM-0.07 for Convert::PEM ... OK
Successfully installed Convert-PEM-0.07
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Crypt::CBC
Fetching http://search.cpan.org/CPAN/authors/id/L/LD/LDS/Crypt-CBC-2.30.tar.gz ... OK
Configuring Crypt-CBC-2.30 ... OK
Building and testing Crypt-CBC-2.30 for Crypt::CBC ... OK
Successfully installed Crypt-CBC-2.30
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Crypt::DES
Crypt::DES is up to date. (2.05)
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Crypt::DH
Fetching http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Crypt-DH-0.06.tar.gz ... OK
Configuring Crypt-DH-0.06 ... OK
Building and testing Crypt-DH-0.06 for Crypt::DH ... OK
Successfully installed Crypt-DH-0.06
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Crypt::IDEA
Fetching http://search.cpan.org/CPAN/authors/id/D/DP/DPARIS/Crypt-IDEA-1.08.tar.gz ... OK
Configuring Crypt-IDEA-1.08 ... OK
Building and testing Crypt-IDEA-1.08 for Crypt::IDEA ... OK
Successfully installed Crypt-IDEA-1.08
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Crypt::Primes
Fetching http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Crypt-Primes-0.50.tar.gz ... OK
Configuring Crypt-Primes-0.50 ... OK
==> Found dependencies: Math::Pari, Crypt::Random
Fetching http://search.cpan.org/CPAN/authors/id/I/IL/ILYAZ/modules/Math-Pari-2.01080604.tar.gz ... OK
Configuring Math-Pari-2.01080604 ... OK
Building and testing Math-Pari-2.01080604 for Math::Pari ... OK
Successfully installed Math-Pari-2.01080604
Fetching http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Crypt-Random-1.25.tar.gz ... OK
Configuring Crypt-Random-1.25 ... OK
Building and testing Crypt-Random-1.25 for Crypt::Random ... OK
Successfully installed Crypt-Random-1.25
Building and testing Crypt::Primes for Crypt::Primes ... OK
Successfully installed Crypt::Primes
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Crypt::Random
Crypt::Random is up to date. (1.25)
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Data::Buffer
Fetching http://search.cpan.org/CPAN/authors/id/B/BT/BTROTT/Data-Buffer-0.04.tar.gz ... OK
Configuring Data-Buffer-0.04 ... OK
Building and testing Data::Buffer for Data::Buffer ... OK
Successfully installed Data::Buffer
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Digest::MD2
Fetching http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/Digest-MD2-2.03.tar.gz ... OK
Configuring Digest-MD2-2.03 ... OK
Building and testing Digest::MD2 for Digest::MD2 ... OK
Successfully installed Digest::MD2
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Math::GMP
Fetching http://search.cpan.org/CPAN/authors/id/T/TU/TURNSTEP/Math-GMP-2.06.tar.gz ... OK
Configuring Math-GMP-2.06 ... OK
Building and testing Math-GMP-2.06 for Math::GMP ... OK
Successfully installed Math-GMP-2.06
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Math::Pari
Math::Pari is up to date. (2.01080604)
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Sort::Versions
Fetching http://search.cpan.org/CPAN/authors/id/E/ED/EDAVIS/Sort-Versions-1.5.tar.gz ... OK
Configuring Sort-Versions-1.5 ... OK
Building and testing Sort::Versions for Sort::Versions ... OK
Successfully installed Sort::Versions
[mmusgrove@nmsdev1 mm-nms_4.3 ~]$ cpanm Tie::EncryptedHash
Fetching http://search.cpan.org/CPAN/authors/id/V/VI/VIPUL/Tie-EncryptedHash-1.24.tar.gz ... OK
Configuring Tie-EncryptedHash-1.24 ... OK
==> Found dependencies: Crypt::Blowfish
Fetching http://search.cpan.org/CPAN/authors/id/D/DP/DPARIS/Crypt-Blowfish-2.12.tar.gz ... OK
Configuring Crypt-Blowfish-2.12 ... OK
Building and testing Crypt-Blowfish-2.12 for Crypt::Blowfish ... OK
Successfully installed Crypt-Blowfish-2.12
Building and testing Tie-EncryptedHash-1.24 for Tie::EncryptedHash ... OK
Successfully installed Tie-EncryptedHash-1.24
That's right, they all installed without a hiccup, even Math::GMP, Math::Pari, and all of the Crypt modules! We were installing this last group as RPMs because we have never been able to get them to install cleanly.
I am ahead of schedule for this task and I owe it all to the wonderful Perl community. You have given us Perl 5.12.2 which so far seems to really rock. You have continued to improve the modules that we use to the point where they install without issues on our platform. You have given us a way to test different versions of Perl in a sandbox (perlbrew). You have given us a simplified, streamlined CPAN client (cpanminus). Thank you so much!
I would love to see the traditional CPAN client (cpan) receive some much needed upgrades but because of the other improvements, I am happy to wait patiently.
Leave a comment