Each module or bundle distribution from CPAN is just a single tar file. On a machine with internet access, you can use any of several methods to download the tar files you want from search.cpan.org, get these tar files onto the target machine, and for each one, go through a process like this:
tar xzf module-name.tar.gz cd module-name perl Makefile.PL make make test make install cd ..
If the target machine is any sort of unix/linux box, you'll probably want to do that as the root user. Or, as a non-root user, you can install the modules in some non-default path (where you have write access) by changing the the third step as follows:
perl Makefile.PL PREFIX=/my/install/path

But as the first reply points out, things can get tricky if the chosen modules have dependencies that you haven't anticipated. The best thing might be to have an equivalent machine with internet access, use  perl -MCPAN -e shell to go through the module installations, and keep track of any dependencies that are reported in the process.

When there are dependencies among the modules you want, you'll need to make sure you install them in the proper order. (The manual CPAN session will do things in proper order, so just keep track of that, and make sure to move all the tar files from the .cpan/sources/authors/id/* directories.)

(UPDATE: If you use "perl -MCPAN" on an internet-connected machine to do a "mirror" or "dry-run" for the set of installations you want, there's a chance that this might miss some module dependencies, if someone has already been installing CPAN modules on that machine. At worst, you may need to look through the README files of each module to see what it's dependencies are, if any.)


In reply to Re: Installing modules from a local machine by graff
in thread Installing modules from a local machine by jimman666

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.