G'day smile4me,

It's not clear whether your "CTB folks" want the newer/additional modules for just their own use ("try new things, build new tools, etc.") or to build code that will subsequently become production code.

If just for their own use, I'd suggest setting PERL5LIB (in .bash_profile, or equivalent) and that's all that needs to be done. From "perlrun: ENVIRONMENT":

"A list of directories in which to look for Perl library files before looking in the standard library and the current directory."

If production code, your "use autodie 2.29" example would be the better option.

Manipulating @INC is fraught with problems. Reversing it, and you end up with '.' at the front of the list: not a good idea. More sophisticated manipulation, like moving the first four standard paths (site/non-site + arch/non-arch) with

BEGIN { @INC = @INC[4 .. $#INC-1, 0 .. 3, $#INC] }

would change the @INC you show to

'/usr/foss/packages/cpan-basics/perl-5.20.3/lib/perl5/x86_64-linux-thr +ead-multi-ld', '/usr/foss/packages/cpan-basics/perl-5.20.3/lib/perl5', '/usr/foss/packages/cpan-basics/perl-5.20.3/lib/perl5/site_perl', '/usr/foss/packages/foss-perllib', '/usr/foss/packages/perl/perl-5.20.3/lib/site_perl/5.20.3/x86_64-linux +-thread-multi', '/usr/foss/packages/perl/perl-5.20.3/lib/site_perl/5.20.3', '/usr/foss/packages/perl/perl-5.20.3/lib/5.20.3/x86_64-linux-thread-mu +lti-ld', '/usr/foss/packages/perl/perl-5.20.3/lib/5.20.3', '.'

but falls over if the base @INC ever changes (e.g. you add vendor_perl paths) or the environment changes (e.g. PERL5LIB or PERLLIB are set).

— Ken


In reply to Re: how to improve: use MODULE VERSION LIST by kcott
in thread how to improve: use MODULE VERSION LIST by smile4me

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.