|There's more than one way to do things|
Installing modules on Win32by SuperCruncher (Pilgrim)
|on Jul 17, 2000 at 00:40 UTC||Need Help??|
SuperCruncher has asked for the
wisdom of the Perl Monks concerning the following question:
I have had great trouble installing modules on Win32. I have been trying to install XML::RSS and XML::Parser. This question is really related to module installing under Win32 in general though. Since the modules previously mentioned are apparently more complicated to install than most (since they require a C compiler), I'll explain the trouble I've been having by installing a simpler module -- lhoward's Number::Spell module.
I've been advised to use CPAN.pm's shell mode to install modules, so I thought I'd give that a try. I run
perl -MCPAN -e shell
from the DOS prompt. I then type 'install Number::Spell'. Lots of information appears, but the program finally exits with:
So, I think to myself, I'll just try 'the hard way'. I downloaded the Number::Spell .tar.gz file. Unzipped and untarred it into a new directory. I understand that I need a make program, so I get both nmake and GNU make. I run
..and get the following error:
Apparently, it can't find Perl on my machine. It's looking for a file named 'c:\perl\bin\perl.exe' in 'c:\perl\bin' which of course it won't find (in my mind it should be looking for perl.exe in c:\perl\bin).
Nevertheless, I try and run make anyway: (I used GNU Make since nmake didn't agree with the syntax of the makefile).
This made me a bit suspicious, since from the error message I assumed that make couldn't shell out to Perl. (Hardly surprising I suppose given that makefile.pl couldn't find Perl). I know a little bit about makefiles from a C++ programming course that I did so I thought I'd have a look around. I immediately find 2 lines in the makefile that worry me:
After looking in MakeMaker.pm's documentation, my suspicions are confirmed, and I know that these should be set to names of the Perl binary. So I change it to:
I figure I don't have to provide the absolute path, since I've got c:\perl\bin in my PATH environment variable. I then trying running make again, and get:
These directory names look like they're missing slashes to me. But I think "What the heck" and just trying doing 'make install' anyway. I get:
Again, the dir name in the mkdir line looks suspicious.
I just hoped that it might just have installed the module, so I write a quick one-liner to test it out:
and I get the dreaded "Cannot locate Number/Spell.pm in @INC" etc error.
CPAN is often cited as a major advantage of Perl, and undoubtedly it is. Popular CPAN modules like LWP which have now made it into the standard Perl distro have undoubtedly saved me hours of time, but I don't see why these modules are so hard to install. I know it may be easier on UNIX, but I tend to my development work on Win32 and then deploy on UNIX, so I really need modules installed on Win32.
I'm using ActiveState Perl so I thought I'd try PPM, but there aren't packages available for the modules I want, and I've had plenty of other issues with it.
Any help is greatly appreciated.