A few days ago, I posted a question 'Installing modules on Win32'. This meditation is really a thank-you note (to a lot of the people who replied: jcwren, tye, toadi and many others) including and advice (and some caveats) for other people in my position.

I wasn't having real luck with the Activestate's Perl distro, and toadi mentioned Dynamicstate. I wasn't very impressed with their Perl2Exe product, but I went ahead and downloaded IndigoPerl (Dynamicstate is now Indigostar.) It installed fine, but when I tried installing modules, I had much the same problem: 'Can't find Perl in c:\perl\bin\perl.exe' etc.

Some of my difficulties with IndigoPerl were caused by having ActiveState Perl still in my PATH environment variable. So, I modified my AUTOEXEC.BAT file to only include IndigoPerl and then I restarted.

I continued trying to install my test module, lhoward's Number::Spell module. Typing 'perl makefile.pl' threw up the usual errors, e.g. 'Cannot find Perl in...', and then I had trouble 'make-ing' it. I finally tracked this down to using the WRONG make program! You must use whatever make program perl -V:make tells you. (Thanks to tye for the reply that put me on the right track here.)

In the case of IndigoPerl, this is nmake, freely available from M$ here.

Because MakeMaker.pm couldn't find my copy of Perl (I still don't understand this. I haven't changed any of the installation settings, and installed it as recommended), I decided to do the unforgivable (::grin::): hack the makefile manually! I changed the lines:

PERL = 0
FULLPERL = 0

to:

PERL = perl
FULLPERL = perl

Typing nmake then did the trick - I was then able to copy the newly created Number and Spell directories to my IndigoPerl lib dir. Doing

perl -e "use Number::Spell; print spell_number(123);"
finally had the desired result!

IndigoStar's DPM package management program (equivalent of Activestate's PPM) is far easier to use than DPM, and actually works! The good news is that DPM uses the same package format as Activestate, so you can just use their (Activestate's) repositories. DPM can also apparently install modules that are .tar.gz-ed, but I have unable to find a command-line tar prog, so I haven't tested that yet :-)

I still have no idea about modules that require C (or XS) files to be compiled. Under Linux, it's all so easy as GCC seems to do the trick (worked for me with Crypt::Blowfish on Linux) but apparently you need MSVC++ on Win32. GCC is available for Win32, so it is frustrating that that can't be used.

Thanks to all those who helped, and I hope this helps people installing modules on Win32 machines.


In reply to Thanks -- Win32 module help by SuperCruncher

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.