Wednesday, January 28, 2009

CPAN, or how to get your project jump-started

CPAN is not a TV channel about politics, nope.
It stands for Comprehensive Perl Archive Network.

It is a gold mine where you can dig amongst close to 15,000 Perl modules. No need to reinvent the wheel, you're very likely to find a module that suits your need in CPAN.
This archive is one of the strength of the Perl community. Most of the modules are open-source and you can scan through 20,000,000 lines of code. There is great material there for beginners to chew on!

The Strawberry Perl distribution includes a full tool chain to install Perl modules from CPAN (as you would do from Linux). This is the main difference with ActivePerl.
ActivePerl allows you to go through its PPM (Perl Packet Manager) system to install pre-compiled modules. You can also download CPAN source code and compile it yourself but you will have to deal with the dependencies yourself.

When installing a module from CPAN, you will automatically pull all dependencies on that module as well, making your install as easy as typing cpan at a DOS prompt.
This will open the cpan shell. Typing help will display all possible commands.
If you know the name of your module, just type install ModuleName and let the process run its course.

CPAN is the place where I'll start in order to investigate core functionalities for the script (for http requests and html parsing).
I posted on the Websearch Help forum to see if anybody could answer the question about violating Google's terms of service.

French expression of the day:
Deep snow in the Winter, tall grain in the Summer: "Janvier rigoureux, an très heureux" and "Vaut mieux voir un chien enragé que soleil en janvier." (litt. Better see an enraged dog than sun in January)

Next posts:
  • Our first Perl program - Part III: Launch a HTTP request
  • How to install Google Analytics on your Blogger blog
  • Our first Perl program - Part IV: Read results from a HTML page
  • Perl help resources
  • Our first Perl program - Part V: Result analysis
  • POD
  • Our first Perl program - Part VI: Add a GUI interface


  1. I think that Twitter is a nice way to share links. It reinforces your web presence. Your Twitter experiment worked! I'm here:)

  2. Hemm... good tutorial. so how you compile script on windows ? make it exe ?