Sorry for the late reply, I've been busy. I'm glad to help!

I'll work with my service provider to figure out how to automate that.

Depending on where you want the new library path to take effect, the ways to best do that differ:

If it's the shell, then as choroba pointed out, maybe you are using a shell other than bash and that shell uses a different initialization script into which you need to put the PERL5LIB etc. variable definitions. Try the command echo $SHELL to find out which shell it is <update> is the default shell, which may be different from the currently running shell (thanks for pointing this out, choroba) - you might try a command like pstree $$ to help figure out the currently running shell. </update>

If it's for the CGI scripts, then note that web servers will usually provide their own, quite restricted, environment to CGI scripts. There are several ways to go about telling the CGI script to look in your home directory for modules, but in my experience, if this script is running on a single provider and the directory structure is unlikely to change, using lib from within the CGI script is often easiest. Usually that'll look something like use lib '/home/yourusername/perl5/lib/perl5'; - try echo $HOME in the shell to find out your home directory location. Also note that the web server needs permissions to access that directory (generally 755 for directories and 644 for files), since the web server will likely be running under a different username, such as nobody.


In reply to Re^5: How to install Perl modules locally on Unix? (updated) by haukex
in thread How to install Perl modules locally on Unix? by slugger415

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.