Try using "The bootstrapping technique" from the local::lib docs to install that module. I recently used this on a host without admin rights and without an existing local::lib installation and I don't remember having any trouble. Afterwards I used cpanm -l ~/perl5 Module::Name to install modules there and it worked fine (Update: IIRC the -l ~/perl5 was necessary because I hadn't yet set up the environment variables at that point). In fact, here's a copy-and-paste from the .bash_history with a few irrelevant commands removed:

wget http://search.cpan.org/CPAN/authors/id/H/HA/HAARG/local-lib-2.000 +024.tar.gz tar xzvf local-lib-2.000024.tar.gz cd local-lib-2.000024 perl Makefile.PL --bootstrap make test && make install cd .. rm -rf local-lib-2.000024* cpanm -l ~/perl5 ...

While you should set up the environment variables in .bashrc/.cshrc as described in the local::lib docs, your web server will almost certainly disregard those. IMO it's often easiest to just specify an absolute pathname in your CGI script via use lib '/path/to/modules';, but whether that's always the best approach depends on your circumstances (like in case this script is being deployed on different hosts with different directory structures).

cpanm happened to already be installed there, but in case it isn't, it also has a simple installation option: curl -L https://cpanmin.us | perl - App::cpanminus (see App::cpanminus).

A few edits for clarity.


In reply to Re: How to install Perl modules locally on Unix? 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.