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

Hi monks,

I'm not sure if I'm doing the right thing whenever I install cpan perl modules using PPM. Here are the situations:

1) Modules found on Active Repositories (e.g. HTML-Template)

ppm> install HTML-Template

No problem, that works.

2) Modules not found on Active Repositories (e.g. GD)

I go to http://theoryx5.uwinnipeg.ca/ppms/ and click on the the module I want to install. The contents of the .ppd file are shown. I then saved the .ppd file to a temp directory under my perl folder. Then I type:

ppm> install GD.ppd

That works.

3) Modules that can't be installed using both methods (1) and (2) (e.g. EncryptForm)

I go to the CPAN website and copy and paste the source code for the module and save it into a perl directory (for EncryptForm, I saved it under C:\perl\lib\CGI).

Are there other ways of installing CPAN modules, particularly for those that aren't found on Active Repositories?

Thanks in anticipation.

Replies are listed 'Best First'.
Re: PPM on windows
by holli (Abbot) on Apr 17, 2005 at 05:39 UTC
      Thanks, holli :) Your tutorial is really useful tutorial.
Re: PPM on windows
by davidj (Priest) on Apr 17, 2005 at 05:02 UTC
    You can always install the module the old-fashioned way: manually :)

    You will need a "make" utility in order to do this. Fortunately, Microsoft does provide one.

    Check here for a good step by step on how to do it.

    hope this helps,
    davidj
Re: PPM on windows
by CountZero (Bishop) on Apr 17, 2005 at 15:33 UTC
    For modules found on other than the AS-repository, I added these repositories to the PPM-configuration.

    The config file looks like this:

    ActiveState PPM2 Repository: % url: http://ppm.ActiveState.com/cgibin/PPM/ppmserver-5.8-windows.p +l?urn:/PPMServer ActiveState Package Repository: % url: http://ppm.ActiveState.com/PPM/ppmserver-5.8-windows.plex?urn +:/PPM/Server/SQL Bribes: % password: "" url: http://www.bribes.org/perl/ppm username: "" insomniac: % url: http://crazyinsomniac.perlmonk.org/perl/ppm/5.8 uwinnipeg: % url: http://theoryx5.uwinnipeg.ca/cgi-bin/ppmserver?urn:/PPMServer +58
    Then PPM will automatically search these repositories as well.

    To add repositories use the rep add [name] <location> command of PPM.

    Don't try to install modules by hand by simply copying them to your disk. This will only work for the simplest of the modules. Either use PPM or the CPAN-module (but then you must have nmake.exe installed and some modules need a C-compiler which we poor Win32-users lack).

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law

      I'll need those extra repositories, thanks :)

      Hm...maybe I'm missing something here. I used nmake to install a module (HCE_SHA) and the resultant file HCE_SHA.pm was created under 'C:/perl/tmp/Crypt-HCE_SHA-0.70//blib/lib/Crypt/' - the 'tmp' directory was created by me and I extracted the tar file from there.

      When I next tried to install EncryptForm.pm using nmake, I got a message saying HCE_SHA.pm not found. I then moved HCE_SHA.pm to 'C:/perl/site/lib/Crypt/' and after that I was able to install EncryptForm with nmake. Then again, it wasn't installed in the proper directory.

      I think ppm is still the better method.