Can i still install modules myself manually by simply copying the files to my machine and using the 'use lib' command to point to their location?

When you talk about installing modules, are you talking about your own .pm files, or modules from CPAN? If it's your own Perl code then copying the files is fine, but for CPAN modules there are better ways. This is because many modules use compiled C code and rely on other shared libraries, so it's not always as simple as copying files.

If you have admin access on the Ubuntu server then for most commonly used modules you can use the system package manager to install from the Ubuntu repositories and automatically resolve any dependencies. For example to install the DBD::Pg module you might use the command:

sudo aptitude install libdbd-pg-perl

If you have console access you can also use the Synaptic package manager to search and install packages from the GUI.

To install less commonly used modules that aren't available from the Ubuntu repositories then you should use a CPAN shell like: sudo cpan

If so, is there a place where perl modules should be located by convention

When modules are installed using the system package manager they end up under /usr/lib, but you shouldn't manually install any files under there. If you have admin access then your files would typically go under /usr/local/lib but otherwise they should go under your home directory as suggested by zentara.


In reply to Re: How to use 'use' statement on Ubuntu by grantm
in thread How to use 'use' statement on Umbuntu by Anonymous Monk

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.