If the modules has XS components, you can't just place it in a directory, you have to install it into that directory using CPAN.pm, ppm, make, or some other method that compiles the module.

Regardless of whether you need to compile the module, your script needs to be able to find it with "use lib". The operating environment of the webserver may be different than the shell operating environment used to install the module. You'll need to find out from your ISP what the correct path to your lib directory is in the CGI environment. You can do some experimentation by running a CGI script that prints out its current working directory and @INC and use those results to figure out where your lib directory is, but your ISP may be using symbolic links or mounts that make the @INC in your CGI different from the @INC in a script run from the shell so it's best to just find out from them how to refer to your lib directory in a script.

update Please don't delete a posting just because you figured it out. Leave the original and add an update message so that replies to your original post make sense.


In reply to Re: installing a perl module to a website by jZed
in thread installing a perl module to a website by kmarshall

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.