Hej all

I've had several discussion to this affect for a while and decided to post it here as I think maybe many people want to know how to do this.

At the moment I'm lucky enough to have my own Linux box on a 2Mb line so I can install what I want when I want on the server.

However, a friend of mine is not so lucky - he rents webspace from a company and has little control outside of his home dir.

He's often wanted to use some of my scripts on his site but as I often use modules from CPAN that arent on his server, we were wondering how to go about using them from within his space when he cant install them into the standard Perl lib tree.

The questions we have are:

1) How can we tell Perl to look for a .pm perl module in a local folder rather than trying to look for it in perl/lib?

2) Say we download a module from CPAN, is it possible to tell "perl Makefile.pl" to install the module locally rather than try and put it in the main lib structure?

-Jed


In reply to Using Modules in a local directory by Speedfreak

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.