Therefore, when we need to use a specific Perl module with our scripts, we download them to our terminals from the CPAN website, scp them over to our dev machines, untar them, and then build them locally.

Mock + cpanspec is often a lot easier. You can build RHEL5 binary RPMs on any RHEL/Fedora and just scp them over, or pop then in a yum repo on the separate network.

If you hate manually packaging missing deps, you will love my megadeps patch for mock https://github.com/jfearn/mock

Basically install megadeps mock + patched cpanspec, set-up a RHEL/CentOS-5 mock root, and assuming your app has a sane spec file, just make the srpm and build that in the mock root with --megadeps, then wait for all the RPMs to be baked.

(and is frequently 5.8.8, which is outdated for a few necessary modules)

If it's core modules that need updating, then a lot of them can be made in to RPMs you just need to tweak the spec file so they get installed on a different path. The patched cpanspec linked to on my megadeps mock page automates this tweak.

Best part is when you upgrade to a newer RHEL/Centos you just set-up a RHEL/Centos-6 mock root and push your applications srpm in to that mock root, and megadeps will only package up the deps missing on that Perl :D

Of course if you actually need features of a newer Perl you are out of luck :)

oh! You could look in to using software collections, I believe there is an SCL for Perl 5.16 avaialle for RHEL-5. cpanspec would need some tweaks to spec file it emits, and the mock config would need to have the software collection repos added, but it shouldn't be a lot of work.


In reply to Re: Can I re-use modules compiled with a different build of Perl, but with the same version number on the same machine? by codiac
in thread Can I re-use modules compiled with a different build of Perl, but with the same version number on the same machine? by neuty

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.