http://www.perlmonks.org?node_id=984192

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

I am using Active Perl 5.12 on Windows XP Machine. Unfortunately this machine is not connected to Internet and I have to install "Device::Modem" package on that machine. There is no way I can get internet connection (So, I cannot use  ppm install Device::Modem. Please suggest me a way (Preferably Command Line), to download and install this package without internet.

Replies are listed 'Best First'.
Re: Active Perl Offline Package on Windows
by ww (Archbishop) on Jul 28, 2012 at 14:15 UTC
    Unless you're prepared to walk, sail, swim, drive, and/or fly to ActiveState's offices and throw yourself on their mercy, you can't do it "without internet" (as you ask in your last sentence).

    However, you can install Device::Modem (so long as you have internet access somewhere, and you obviously do or you couldn't have posted this question) without an internet connection on the W32 XP box in question. For starters (and some cogent observations), please read Yes, even you can use CPAN and the various tuts in Modules: How to Create, Install, and Use, and A Guide to Installing Modules.

    For other specific instructions, you can Super Search for terms such as "miniCPAN," "make" (or 'make file', and, of course, "install" and --IIRC-- another approach: "Perl on a Stick" or similar, related to creating a transportable Perl and modules on a thumb drive/memory stick/etc.

Re: Active Perl Offline Package on Windows
by Jenda (Abbot) on Jul 29, 2012 at 23:31 UTC

    You can't get an internet connection, but you can copy files, right? So you have to download the files PPM needs manually, copy them and then install from the local copies.

    First find out the URL of the repository. Start PPM on that machine and go to Edit / Properties. Note the URL for the ActiveState repository (for my dated 5.8 it's http://ppm4.activestate.com/MSWin32-x86/5.8/825/package.xml). Then go to a computer with a connection and download the referenced file (for the 5.8 it's about 9MB!). Search for "<PROVIDE NAME="Device::Modem"". There's a <CODEBASE HREF="...right above, download that file (the path is relative to the repository path). If the <SOFTPKG> containing the <PROVIDE NAME="Device::Modem"/> contains any <REQUIRE> tags look for the <SOFTPKG> that <PROVIDE>s them and download the file(s) as well.

    Then transfer all those .tar.gz files you downloaded to some directory on the WinXP machine. Open them by WinZIP or something and extract the *.ppd file in the root of each archive into the same directory.

    Start the command prompt, chdir to the directory and run ppm install Device-Modem-1.56.ppd (or whatever version you ended up downloading.

    I do think ppm should find the other required modules if you download and transfer them into the same directory. If it doesn't, try to install the dependencies first.

    Hopefully this still works with 5.14.

    Jenda
    Enoch was right!
    Enjoy the last years of Rome.

      I liked this solution, My PPM File Archive is:
      http://ppm4.activestate.com/MSWin32-x86/5.12/1205/package.xml
      When I open it any browser (Chrome/Mozill/IE) it hangs (Seems this is a big file). When I download this file (Using Download Manager), it is downloaded in some binary format. Please help me download this file. Else I cannot search my string as suggested by you.

        Append ".gz" to the file and open with archiver of your choice. Seems the HTTP headers were not entirely right so the downloader did not decompress the data.

        Jenda
        Enoch was right!
        Enjoy the last years of Rome.

        As explained by others, you have to un-gzip it first. They use a Content-Encoding: x-gzip header which is not really RFC conform.

        But with the above mentioned approach, you can also download a complete copy of the ppm archive. With a little regex magic on the xml file(s) to correct the paths, you can go ahead and tell the (graphical) ppm interface "Hey, you know what, there's this new server called 'C:\myserver', check it out!".

        "I know what i'm doing! Look, what could possibly go wrong? All i have to pull this lever like so, and then press this button here like ArghhhhhaaAaAAAaaagraaaAAaa!!!"
Re: Active Perl Offline Package on Windows
by dasgar (Priest) on Jul 31, 2012 at 04:10 UTC

    Here's an alternative solution. You can get the portable version of Strawberry Perl and put that one a USB drive. From your system that has internet access, you can install from CPAN whatever modules you need. Then move the drive to your Windows XP machine to run portable Strawberry Perl from that drive or copy it to the local hard drive of the Windows XP machine..

Re: Active Perl Offline Package on Windows
by rpnoble419 (Pilgrim) on Aug 01, 2012 at 01:31 UTC
    I had a similar issue. I kept two exact copies of Perl. One on my test machine (internet connected) and one on my Server. I would copy the Site and Lib directories between them. If any issues developed I would just copy the entire Perl folder from my test machine to the server. I have worked on Perl for Windows for over 13 years. I have never had to go another OS to get my job done. Perl works just as well on Windows as it does any where else.
Re: Active Perl Offline Package on Windows
by vagabonding electron (Curate) on Jul 30, 2012 at 15:08 UTC
A reply falls below the community's threshold of quality. You may see it by logging in.