http://qs321.pair.com?node_id=555078

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

Scenario: The goal is to use PPM to download *without* actually installing the modules. This is necessary because the machine used to download will be different from the target machine. The downloaded files will be copied to the target machine and installed using PPM on a local repository.

Problem: after taking a look at PPM help, A guide to installing modules for Win32 and associated searches, it appears that there is no built-in mechanism to handle the above scenario. Moreover, there does not appear to be a standard way to individually identify the specific URL for ppd files in the online repositories.

Questions:

=oQDlNWYsBHI5JXZ2VGIulGIlJXYgQkUPxEIlhGdgY2bgMXZ5VGIlhGV

Replies are listed 'Best First'.
Re: PPM download ppd without install
by holli (Abbot) on Jun 13, 2006 at 16:30 UTC
    I faced the same problem lately. My solution was to patch ppm so it doesn't delete the temporary files it creates. This can be done by simply commenting out the lines
    247: rmtree($tmpdir) if $tmpdir;
    and
    309: unlink $filename;
    After patching and installing the modules you need, you will find the downloaded tarball somewhere in your temp directory. This doesn't save the .ppd file, but creating a ppd for a tarball you already have is trivial.


    holli, /regexed monk/
Re: PPM download ppd without install
by jdtoronto (Prior) on Jun 13, 2006 at 20:20 UTC
    Swallowing up the TARBALL's, as suggested earlier, wont resolve the issue of dependencies. You should also ask why are you going to all this trouble to install the modules like that?

    Using PPM install the modules into your development environment.

    Create your own modules, when you need them, in a directory under the execution directory. I use /lib. Then at the top of my root executable Perl file you will find:

    use strict; use warnings 'all'; use FindBin; use lib "$FindBin::Bin/lib";
    Then I use ActiveStates PerlApp from the Perl Dev Kit (you could possibly use PAR to do the same thing) to create an exe - making sure I tell it where to find my /lib directory so it can load my modules as well. Generally speaking this will create a bundled file which has all the modules and dependencies in it. This way you need not have Perl installed on the target machines and yet you will have everything you need, including the exact version of Perl you are developing with.

    I currently service 1500 users this way with one product. The original version which relied on locally installed Perl and modules was a nightmare - using PAR (which I did for a time ) but more recently PerlApp has been an absolute godsend as far as distribution of executable code is concerned.

    jdtoronto

Re: PPM download ppd without install
by lithron (Chaplain) on Jun 13, 2006 at 16:33 UTC
    Disclaimer: I'm no PPM wizard and I don't know the answers to most of your questions.. but perhaps this will point you in the right direction.

    The 'rep' command will be useful to identify the repositories you are currently set up to use. Old style web interface repositories still exist, so you may want to see if any of those are set up in your PPM install. If so then you can browse through them with a web browser.

    The 'prop' command looks interesting as well. You can run 'prop CGI' and find out information on the package, as well as what looks to be a fully qualified URL where you can probably download the package.

    See also ActiveState's zip archive

Re: PPM download ppd without install
by nienberg (Initiate) on Apr 06, 2007 at 23:28 UTC
    Use ppm to install the module on your test machine. Then look in perl\site\lib\ppm-conf directory to find the ppd file for your new module. Inside it will be a reference to the actual "tar.gz" file on the web. You can then download the tar file, copy the ppd file from your test machine, and modify the Codebase Href location in the ppd to suit your local tar file. Mark