Friday, April 15, 2011

Perl CPAN - install cpan modules easily

I managed to install a new perl module on my Snow leopard. Till now, I was of the opinion that installing perl modules is a tedious task. Thanks to CPAN, that I was proved wrong.

All I had to do was type $> cpan on the terminal.

This command took me to a special cpan shell. In that shell i installed Text::Soundex module, just by saying

(notice the new cpan prompt here)
cpan>  install Text::Soundex
done!

It is so easy and does not take a lot of time. On a side-note, Soundex is the algorithm by Donald E Knuth (Don) that will index names based on the phonetics of it. The idea is startling and is wrought with many possibilities. It would be interesting to explore the algorithm and I would try to add more details to the algorithm in my next post.

FTR: I am using perl 5.10.0 that came pre-installed with my snow-leopard. Not sure whether cpan takes care of perl version dependencies. 

No comments:

Post a Comment