I assume that by "method" you mean "module". In theory, you can "use lib", but in general, you shouldn't assume that anything will work without installing (or at least building) the module first.

Installing modules isn't hard: most perl modules use the same sequence of commands for building / installing:

# perl Makefile.PL # make # make test # make install
As long as the modules don't include C/XS code, all you need to install them is a standard make command.

Some newer modules use Module::Build instead. Theoretically, you'll only need perl to build those (again, unless you need to compile C/XS code, in which case you'd need a working C compiler).

Personally, I tend to just use either the CPANPLUS or CPAN module to install stuff. It generally is a lot less hassle than trying to subvert the installation process, unless you know what you're doing. In other words, since you're new to perl, please don't mess about with this, and install the modules like they expect to be installed. You'll save yourself a lot of trouble.

See also A Guide to Installing Modules.


In reply to Re: using methods/modules ? by Joost
in thread using methods/modules ? by Akhenaton

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.