I would suggest setting the environment variable PERL5LIB externally to running perl scripts, rather than hacking every script to add a use lib. This is considerably less maintenance if you decide to change your directory structure - like upgrading a version.
The burden you now have is to keep track of what you put there in the event you upgrade Perl and have to re-install your modules.
There's even a way round this. If you install to a common directory, you can share modules between perl versions:
perl Makefile.PL LIB=$MYSHARE/lib PREFIX=$MYSHARE make make test make install
Note that $MYSHARE is a shell environment variable pointing to a path to which you as installer have write access. This even means that you can set up modules without needing root or sysadmin rights.

To use said directory, set PERL5LIB to include $MYSHARE in the path. It also makes installation possible to other nodes without invoking perl (just tar up the directory and distribute it).

I tend to specify both LIB and PREFIX because for the following reasons: LIB is specified so that all .pm and XS code can be found. PREFIX is specified to provide placeholders for manpages and any other collateral that does not end up in the LIB. Note: you might get problems between perl versions if you have incompatible XS binaries.

--
I'm Not Just Another Perl Hacker


In reply to Re: Re: Where to install my own perl modules? by rinceWind
in thread Where to install my own perl modules? by neilwatson

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.