127 words — 1 minutes read

Newbie Guide to CPAN

In my current project I have the pleasure (?) to work with Perl. I found out that there are hundres (thousands?) of useful modules out there. Before they can be used however, they have to be downloaded an installed… Grief!

Here’s the dummies guide to doing it: (Assuming a Cygwin installation on a Win32 box)

  1. Locate the module on Cpan

  2. Download the module.

  3. You have a module-version.tar.gz.tar file which is useless (or so it seems)

  4. mv module-version.tar.gz.tar module-version.tar.gz

. This removes the extra .tar extension…

  1. gzip -dc module-version.tar.gz | tar -xof -

. This extracts the module and creates a directory called “module-version”

  1. In that directory:
perl Makefile.PL
make
make test
make install
  1. Now you should have the module installed and running

Thanks to the Install FAQ

Jens-Christian Fischer

Maker. Musician