You don't need root access to install a module. You simply need to save it into a specific location such as /usr/local/path/to/MyModules/ModName.pm. Then include the module in your code using the lib pragma, like so:

#!/usr/bin/perl -w use strict; use lib "/usr/local/path/to"; # Notice where this path ends... :) use MyModules::ModName; # Other use statements... # ...on with other code...

This should work as long as the module is packaged into 'MyModules::ModName'. If it's a pre-existing module you're working with, alter the path in the lib statement and name in the use statement, accordingly. :)

At least that's the way I've done it. If this is incorrect, I'm certain someone will correct me. I'd even go so far as to appreciate it! :)

Hope this helps,

/Larry


In reply to Re^2: jpg file demensions by larryp
in thread jpg file demensions 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.