I doubt I'm the first person to ask. I'm hoping to get it all in once place if nothing else -- though, I was unable to find much on here using the regular search.

I wish to test some stuff on a test account on a lunix box that I don't own. I found out that it's exceedling trickey to install modules as non-root. I don't think it should be.

The first problem, the admin had already configured CPAN, so the CPAN::Config pointed to /home/adminname/.cpan and I couldn't even start the shell. :(

How can you reconfigure CPAN to use ~/.cpan once the real admin has already configured it?

The second problem is the @INC. Is there a way to fool a root-installed binary into adding your ~/my-mods to @INC? I keep looking for an environment variable for this, but there doesn't seem to be one. Yeah, I can add -I ~/my-mods to everything...

Is there a transparent way to globally modify @INC?

Of course, I can always just build my own perl, but that seems cheap and lame to me. Also, then the #!/usr/bin/perl won't work.


In reply to CPAN non-root questions by jettero

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.