Friday, October 27, 2006

CPAN with Activestate PERL on windows

You need CPAN if you are doing any serious work. During the course of my work I was using EMail::Valid and GMail::Checker and perl JSON modules. None of this was available from activestate PPM repository.

This is a serious limitation and I was looking for a way to install CPAN modules on windows.
To make CPAN install work you have to install the Visual C++ /.NET framework toolset. The list of things to install is pretty long and discouraging. I was not ready to go all the distance. Because typically these install sessions degenerate into install A to install B to install C dependency hell.

The win32 perl wiki proved to be useful (http://win32.perl.org/wiki/index.php). There is one distribution called CamelPack. Camelpack install activestate perl and dev-c++ plus nmake tool. Just use the camelpack installer with a net connection ON. The installer does everything for you. At the end of it I was able to install all the 3 modules using CPAN.

Few caveats
  • You may need to set LIB and INCLUDE env variabled
  • The camelpack installer will install activestate perl in location c:\perl, it did not ask me for a location. That was a problem because i already had one copy of activestate perl installed.
  • I am not sure if my install works for complicated modules. I was not able to install DBI. I just fetched DBI using ppm.
© Life of a third world developer
Maira Gall