jimman666 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: Installing using CPAN without internet
by graff (Chancellor) on Dec 18, 2006 at 07:05 UTC
    You already asked this question a little while ago: Installing modules from a local machine. Try updating or replying to the earlier thread, instead of starting another one for the same question.

    For example, it would help (in that other thread) to give a hint about what OS you plan to be dealing with on the non-internet-connected machines.

Re: Installing using CPAN without internet
by marto (Cardinal) on Dec 18, 2006 at 09:00 UTC
Re: Installing using CPAN without internet
by rinceWind (Monsignor) on Dec 18, 2006 at 10:24 UTC

    Besides what others have suggested, look at CPAN::Mini. Install this on your internetted machine; ideally run minicpan daily on a cron job.

    CPAN is conveniently about 600Mb, which fits comfortably on a CD. So, burn yourself a minicpan CD to take with you to go around the schools. On the target machines, use the CPAN shell:

    o conf urllist unshift file://d:

    assuming that the target machines are Windows and that the CDROM drive is d:. try an install, and if it works, do an o conf commit.

    --

    Oh Lord, won’t you burn me a Knoppix CD ?
    My friends all rate Windows, I must disagree.
    Your powers of persuasion will set them all free,
    So oh Lord, won’t you burn me a Knoppix CD ?
    (Missquoting Janis Joplin)

Re: Installing using CPAN without internet
by duckyd (Hermit) on Dec 18, 2006 at 07:07 UTC
    Using CPAN.pm to install perl modules will require access to the internet from the machine you're running on. I'd suggest that you download all the tarballs you need, bring then on some type of removable media, and install each manually. You'll need to be careful to make sure you bring all the dependencies with you, but other than that it should be straightforward.

    Update: as graff noted above, depending on the OS you're dealing with the process can differ. The above advice should suffice on *nix, or most anywhere as long as you are able to install modules from c source

      Using CPAN.pm to install perl modules will require access to the internet from the machine you're running on.

      IIRC this is not strictly true: one can have a local mirror of all the modules he needs, and then she can conveniently use CPAN.pm with file:// URLs. Then I believe (but I am not really sure because I've only given a peek into the module's docs) one could use CPAN::Mini::Inject on the machine with internet connection to resolve dependencies for given modules and mirror them locally.

Re: Installing using CPAN without internet
by tweetiepooh (Hermit) on Dec 18, 2006 at 10:44 UTC
    Why not ... take note of the files on a pre-install system. Now install the modules and software you want and then build a tar bundle or similar with these files in it, all placed in there proper place. Sometimes you can build files into a chroot type place but setup to run from final install. That may help make things easier.

    Now extract the files onto a test school system and ensure it all works. If it does and no adverse affects on other software already installed you have an "image" sort of thing that can be intalled where ever. You really should ensure that you don't overwrite existing programmes unless you know what you are doing. Certainly don't downgrade files.

    Note that a downside is that the system may not record the install in package management tools unless you are using that as the mechanism.

Re: Installing using CPAN without internet
by johnvk (Initiate) on Feb 08, 2010 at 21:53 UTC

    posting another solution, or really, workaround / hack.

    my situation involves corporate vpn. I have cygwin on my wxp pc. i CAN disconnect from the vpn everytime i want to do cpan, but i'd rather not. I can dl modules via search.cpan.org manually, and i just want to use CPAN to make & install them.

    especially today, because yesterday i was in the middle of installing things when emacs-on-cygwin hung. I believe all modules finished installing, but i just want to use perl -MCPAN -e shell to check whether they were really installed or not, and to pick up from where they left off if not finished.

    I also think that the CPAN automatic dependency checking is very convenient.

    so i found a work around

    perl -MCPAN -e shell cpan> o conf index_expire 1000 cpan> make Some::Module
    this sets the index_expire config variable to 1000 days. that's abt 3 years. it was only temporarily set for this run, which is nice.