It appears that, after beating my head slightly, simply changing my environment variable from PERLLIB to PERL5LIB fixes an odd problem.

Quick background: local install to ~/perl. In order for cpan to properly detect pre-reqs that it just installed, you need to set the environment to include all the proper locations. So I just put this in a file, I called it 'sp' (short for "set perl environment" - if I'm going to make a short cut, I emphasise short), and just run ". ~/sp":

export PERLLIB=`find $HOME/perl -name 5.8.8 -o -name aix* -o -name sit +e* | \ xargs perl -e 'print join ":",@ARGV'`
(I'm sure I could do that with just perl, no find, but, hey, the point is lazy, not perl purity.) As long as I'm being lazy, I omit the '5' in 'PERL5LIB' because, well, perlrun says that when PERL5LIB isn't set, it falls back to PERLLIB. That turns out to be true for perl. But not for everything else. Specifically, if you're installing something that requires another module that is also not core (and thus in your local module directory), and, I think, the current module also uses MM instead of Module::Build (though maybe I just didn't hit it with MB), I think the PERL5LIB gets set, basically ignoring your PERLLIB, and suddenly things can't be found, and tests fail. Miserably.

Adding in the 5 again, and suddenly "cpan -i Perl::Critic" works just fine. Ugh. Shortcuts that aren't. Don't use PERLLIB. Use PERL5LIB. Because that seems to be what some others are doing, and you'll get bit otherwise. Woops.


In reply to PERLLIB vs PERL5LIB: not quite the same by Tanktalus

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.