Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Installing Modules on Windows XP

by Gorby (Monk)
on Feb 02, 2004 at 13:13 UTC ( #325846=perlquestion: print w/replies, xml ) Need Help??
Gorby has asked for the wisdom of the Perl Monks concerning the following question:

Hello Wise Monks.

How do you install modules from CPAN on windows xp? I've used the ppm program but it doesn't seem to have a complete list of the modules on CPAN.

It's the DIGEST::SHA module that I'd like to install and ppm doesn't seem to know about it.

What do I do?

Thanks in advance.


Replies are listed 'Best First'.
Re: Installing Modules on Windows XP
by Roger (Parson) on Feb 02, 2004 at 13:57 UTC
    Do you have Visual C/C++ compiler installed on your computer? The Digest::SHA module has XS components and requires a C compiler (Visual C compiler to be exact) to compile properly.

    Well, in theory, once you unzipped the source package, you just do perl Makefile.PL, make, make test and make install to install the module. But sometimes it is not that straight forward, especially when you have to compile XS component(s), you never know what sort of error might occur. It could be a challenging task for beginners.

    There is an easier option however. I think PodMaster maintains an (up-to-date?) 5.8x ppm repository, you could check if he has precompiled Digest::SHA package in his ppm repository already. Otherwise if you ask him nicely, he might be able to compile it for you.

      Should it not be nmake instead of make on Win_xx??
        There are many different make utilities on Windows, nmake is just one of them.

Re: Installing Modules on Windows XP
by ajt (Prior) on Feb 02, 2004 at 16:29 UTC
      Can't add it myself now (too much work on my desk), but I think this question (Windows PPM and how to deal with Windows CPAN) needs to go to Categorized Q&A so we don't have to respond to it in full every time. I'll gladly contribute my share if someone will start the topic.
Re: Installing Modules on Windows XP
by Art_XIV (Hermit) on Feb 02, 2004 at 15:05 UTC

    If you get tired of messing around with ppm files, a nice alternative is to download Cygwin's Perl and gcc compiler.

    Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"
Re: Installing Modules on Windows XP
by 3dbc (Scribe) on Feb 02, 2004 at 15:57 UTC
    Here is a session with ppm concerning repositories. C:\Documents and Settings\Administrator>ppm PPM - Programmer's Package Manager version 3.0.1. Copyright (c) 2001 ActiveState SRL. All Rights Reserved. Entering interactive shell. Using Term::ReadLine::Stub as readline lib +rary. Profile tracking is not enabled. If you save and restore profiles manu +ally, your profile may be out of sync with your computer. See 'help profile' + for more information. Type 'help' to get started. ppm> rep Repositories: [1] ActiveState PPM2 Repository [2] ActiveState Package Repository [3] Jenda [4] CPAN [5] DaveRoth [6] Local ppm> man rep Unknown command 'man'; type 'help' for a list of commands. ppm> help rep repository -- Repository Control Synopsis rep Displays all repositories rep add [name] <location> Adds a new repository; makes it active rep delete <name or num> Deletes specified repository rep describe <name or num> Displays information about the specifi +ed repository rep rename <name or num> <name> Renames the specified repository to the given name rep on <name> Activates the specified repository rep off <name or num> Removes the repository from the active + list rep up <name or num> Moves the specified repository up one rep down <name or num> Moves the specified repository down on +e Description The *repository* (or *rep*) command controls two lists or reposito +ries: 1 The list of "active" repositories. This is the list of reposit +ories used by *search*, *install*, *upgrade*, and *verify*. 2 The list of all known repositories. You can designate a reposi +tory "inactive", which means PPM will not use it in any commands. If no arguments are given, the rep command will list the active repositories defined in the PPM settings. The order is significant +: when installing a package, PPM will try the first repository, then the second, and so on, until it find the package you asked for. When searching, PPM merges the results of all the repositories together +, so the order is less important (see the *search* command). For example, when you enter: rep PPM3 will return something resembling this: Repositories: [1] ActiveCD [2] ActiveState Package Repository [ ] An inactive repository In the example above, entering 'rep off 2' will disable the second repository (the ActiveStat Package Repository). To add another repository: rep add [options] <NAME> <LOCATION> The following options are available for the 'add' command: * -username * -password These options allow you to specify a username and password to be u +sed when logging into a repository. Currently, these are only used for + FTP and WWW repositories. For example: rep add "EZE" with "EZE" being the name of the repository (for easy reference) a +nd the location noted by the http location. If you were to enter the rep command again, you would see: ppm> rep Repositories: [1] ActiveCD [2] ActiveState Package Repository [3] EZE [ ] An inactive repository To move the new repository to the top of the Active list, you woul +d type: ppm> rep up EZE Repositories: [1] ActiveCD [2] EZE [3] ActiveState Package Repository [ ] An inactive repository ppm> rep up EZE Repositories: [1] EZE [2] ActiveCD [3] ActiveState Package Repository [ ] An inactive repository To disable the ActiveCD repository temporarily, enter the followin +g: ppm> rep off ActiveCD Repositories: [1] EZE [2] ActiveState Package Repository [ ] ActiveCD [ ] An inactive repository To describe a repository, refer to it either by name, or by the nu +mber displayed next to the repository in the Active Repositories list. +You must refer to inactive repositories by their full name. ppm> rep describe 2 Describing Active Repository 2: Name: ActiveState Package Repository Location: Type: PPMServer 2.00 ppm> rep describe ActiveCD Describing Inactive Repository: Name: ActiveCD Location: F:\PPMPackages\5.8plus Type: Local Directory To re-activate the ActiveCD repository, use the *rep on* command. +You must refer to inactive repositories by name, not number. ppm> rep on ActiveCD Active Repositories: [1] EZE [2] ActiveState Package Repository [3] ActiveCD [ ] An inactive repository Repository Types PPM3 supports several types of package repositories: 1. PPM Server 3.0 ActiveState's SOAP-driven package server. Because all searches + are done server-side, the server can deliver much richer informati +on about packages than other repositories. 2. PPM Server 2.0 The SOAP server designed for PPM version 2. PPM3 ships with th +e PPM2 repository as well as the PPM3 repository, so you can use eith +er. Simple searches are performed server-side. If your search is t +oo complicated for the server, PPM3 will download the package sum +mary and search by itself. 3. Web Repositories Older versions of PPM used non-SOAP repositories (directories +full of PPD files accessible using a web browser). Over the history + of PPM, there have been several different ways of organising the +files so that PPM can search for packages properly. PPM3 tries to do +wnload a summary file first -- if that fails, it gets the directory i +ndex. It parses the summary or the index, and caches it. Searches ar +e done from the cache. 4. FTP Repositories FTP is another way of exposing a directory full of PPD files. +PPM3 consideres FTP repositories a subset of Web repositories. Trea +t them as identical: PPM3 downloads the summary or the "index" (file listing in this case), parses it, and then searches from it. 5. Local Repositories To support installing packages from the ActiveCD, a local dire +ctory can be a repository. PPM3 searches the files in the directory. + All valid path formats are supported, including UNC paths. ppm> rep describe cpan Describing Active Repository 4: Name: CPAN Location: Type: Webpage -3dbc

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://325846]
Approved by blue_cowdawg
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (8)
As of 2017-07-24 19:38 GMT
Find Nodes?
    Voting Booth?
    I came, I saw, I ...

    Results (358 votes). Check out past polls.