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

I am running a win2k pro with active state and am trying to play around with perl, I found an example that I would like to run, but when I run the script it reports that it cannot find xxx.pm, where can I download .pm that I don't have. Thanks in advance.

Replies are listed 'Best First'.
Re: how to get hold of perl modules
by fruiture (Curate) on Apr 08, 2003 at 13:43 UTC

    Perl modules can be found on cpan.org (easily using CPAN.pm), of course, but there are some lmitations on windows. Luckily, ActivePerl contains a cute program called ppm (have a look in the installation directory) that will install pre-built packages from PPM-Repositories. One repository will already be stored, the Activestate one and you'll find more. (I know that at least one Perlmonk hosts such a repository, but i don't remember who it is, sorry).

    --
    http://fruiture.de
Re: how to get hold of perl modules
by Corion (Patriarch) on Apr 08, 2003 at 13:50 UTC

    Another method to install many modules from http://search.cpan.org is

    1. Download the file
    2. unpack it into its own directory
    3. copy all .pm files into the correct path below the directory where Perl resides : If Perl resides in C:\Perl, and your module is called My::Funky::Module, then there should be a file called Module.pm somewhere in the archive, and it should be copied into C:\Perl\site\lib\My\Funky\Module.pm.

    This method is not the end-all, be-all, because you won't be running the tests included with the module - therefore it's better to use ppm to install modules.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web
Re: how to get hold of perl modules
by cbro (Pilgrim) on Apr 08, 2003 at 14:16 UTC
    I have had problems using CPAN on Windows. You may want to try using the ppm program. It's designed to work specifically with Active State, so I would get used to it regardless. The syntax is pretty much the same:
    (e.g. 'install DBD-mysql' instead of 'install DBD::mysql).
    You get a ton of HTML tutorials/docs on how to use the program installed by default, that is, if you did a standard install.
Re: how to get hold of perl modules
by AcidHawk (Vicar) on Apr 08, 2003 at 17:15 UTC
Re: how to get hold of perl modules
by Coplan (Pilgrim) on Apr 08, 2003 at 13:50 UTC
    I'm speaking from the linux background -- but the trouble shooting might overlap. I havn't used Active State very much. But again, trouble shooting could be very similar.

    I would first ask if you're sure you don't have the perl module. It often happens that you might just not have the module in the proper path. Check your paths and make sure that you don't have the module.

    Next, visit CPAN. While most of the modules on there are for linux, you will find a few for Windows. If you know specifically what the module is that you're missing, use the CPAN search (search.cpan.org) to find it. Type it in exactly the way the error message calls it.

    As for placement. You can probably place the module in a directory relative to the root. For example, if you have a module called Radio::playlist, create a directory within your perl script's directory called "site/lib/Radio", and place playlist.pm within that directory. If you have a module called Bleh, you can place Bleh.pm right in that "site/lib/ root directory.

    Hope this helps.

    --Coplan

Re: how to get hold of perl modules
by nite_man (Deacon) on Apr 08, 2003 at 14:47 UTC
    Get ppd from ppmpackages and arhive of ActivePerl modules from x86 or you can install 'microsoft visual studio' and install all modules from CPAN like under Linux but use nmake instead of make:
    unzip SomeModule-XX-XX.tar.gz cd ./SomeModule-XX-XX perl Makefile.PL nmake nmake test nmake install
    I hope I help :-)
    --------> SV* sv_bless(SV* sv, HV* stash);