Perl Module Installation

MS Windows

There are many versions of Perl for MS Windows, for example:

To use CPAN or manual installation for Perl modules a version of the make tool is required. Some installations provide their own make (e.g. Strawberry Perl and Cygwin) for others it has to be installed separately. Microsoft supply their version of make (nmake) as a free download, which should be installed if installing modules. See for further details.

Package Managers

On package managed operating systems (e.g. Debian Linux, RedHat Linux, OpenSolaris, etc.) or package based environments (e.g. Cygwin, Fink, MacPorts, etc.) many Perl modules are available as packages. See the documentation associated with the package environment for details.


The Comprehensive Perl Archive Network (CPAN) acts as a central repository for Perl modules. To ease installation of Perl modules CPAN maintain a set of modules (CPAN and CPANPLUS) which act as clients to the repository allowing the user to install and update modules in their Perl installation. These modules handle fetching the module distribution, checking for dependencies, building the module, running the module test suite and installing the module.

The CPAN and CPANPLUS modules are usually used interactively:

  • CPAN module:
    perl -MCPAN -e shell
  • CPANPLUS module:
    perl -MCPANPLUS -e shell

The shell has built-in help, which is accessed using the help command.

For detailed information about CPAN see and the CPAN module documentation.


ActiveState ActivePerl provides an alternative to CPAN called PPM. The ppm client program is used to downloads and installs modules from the PPM Repository. See Using PPM for details.

Manual Install

Downloaded Perl modules follow a standard procedure for installation:

  1. Unpack the module:
    tar xf module.tar.gz
  2. Generate build file from module description:
    perl Makefile.PL
  3. Build the module:
  4. Test the module:
    make test
  5. Install the module:
    make install

Check the module's documentation (usually README.txt) for details of any pre-requisites and deviations from the normal procedure.

Up Perl Contents Contents
tutorials/06_programming/perl/module_install.txt · Last modified: 2010/02/15 11:25 by hpm