Hi,

I reply to this at my own peril, I realize, but I thought I'd mention 'Another Way To Do It'.

On a per script basis you can alter the @INC with:
BEGIN{unshift @INC, "/path/to/stuff"}

For the vast majority of things you do it is easier and better to follow the suggestions of the other monks here.

Also for installing modules in odd places I usually do a get Module::Whatever from within the CPAN shell, but then exit and go to ~/.cpan/build/Module-Whatever-0.01a and manually from there do a perl Makefile.pm Once that process is complete you can edit the Makefile that has been generated and change PREFIX= to read the path where you want it installed. From there it's usually just make, make test and make install.

There are also configuration settings within the CPAN shell that may help you alter install locations and the like - o conf will show you the options.

Again, don't do it this way - I merely present a different approach. This is something I find convienent to play with modules I want to have around one day and gone the next, particularly when I'm working on a module in-house.

Good luck,
{NULE}
--
http://www.nule.org


In reply to Re: adding custom libraries to my perl by {NULE}
in thread adding custom libraries to my perl by asinghvi

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.