CPAN supports a native offline mode, which recommends doing it from a copy of the ~/.cpan/sources directory.
Once you've taken a copy, you can then install all files under it like this:
% find authors/ | grep -e "/id/.*\.gz" | perl -MCPAN -MCPAN::Config -n
+ -e '$CPAN::Config->{keep_source_where} = "/other/perlmodsrc/tars"; c
+homp; @f = split /\//; $mod = join("/", splice @f, -2, 2); CPAN::Shel
+l->install($mod);'
I have created one of these directories using only the ~/.cpan/sources/authors and not the ~/.cpan/sources/modules directory successfully, but CPAN seems to update them automatically.
I've also created one by creating a /somepath/cpan/authors/id/A/AL/ALL directory, and copying all the files into there, but that mucks up dependancies.
So, if you're happy enough to build the correct directory structure, and to copy in a recent ~/.cpan/sources/modules directory, and don't mind if CPAN does connect and maybe update those module definition files, then this should be a workable solution.
If you're worried about network connectivity or newer versions of modules coming available, then you could try hacking through PAUSE (mldistwatch specifically) to grab the file generator code, and auto-generate your 02packages.details.data.gz and 03modlist.data.gz which should allow the rest to work nicely.
Other ways would be to write a script to extract each tar, enter the directory, do a make and make install, then to go back and do a make test on each directory - this would nicely skip the dependancy issues.
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.