Using PPM

What is PPM?

PPM is the package management utility for ActivePerl. It simplifies the task of locating, installing, upgrading and removing Perl packages. The PPM client accesses PPM repositories (collections of packages) on the internet or on a local network. It is also used to update previously installed packages with the latest versions and to remove unused packages from your system.


PPM is installed automatically with ActivePerl.

To use PPM, your computer must be connected to the internet or have access to a PPM repository on a local hard drive or network share.

If you connect to the internet via firewall or proxy, you may need to set the http_proxy environment variable. See PPM, Proxies and Firewalls for more information.

Access to some PPM repositories requires an ActivePerl Business Edition license.


To launch PPM's graphical user interface, run ppm without any command line arguments:


The interface should look something like this:

When launched, PPM automatically synchronizes its local database with the installed perl packages (including those installed manually or via the CPAN shell). The interface is temporarily locked while this synchronization takes place.

Hovering the mouse pointer over icons in the toolbar displays tool tips describing what each button does. These buttons are:

Use the Filter text field to limit the packages displayed in the Package List pane to those matching the text entered (case insensitive substring match).


Click the magnifying glass icon to select which package meta-data to match against:

The Package List pane can display the following columns of package information:

The Status tab displays messages about the current status of the PPM client, marked actions, and information about the actions being run.

The Details tab displays package information and, for installed packages, a list of all installed files.

The PPM Command Line

All PPM operations and configuration can also be performed at the command line. See the ppm man page or 'ppm help' for more information.

Finding, Installing, Removing and Upgrading Packages

Find a package.

To find a package in the repository:

As text is entered in the Filter field, the list of packages is automatically updated as the substring match becomes more precise. Click the magnifying glass icon to filter on different meta-data (e.g. Author).

Alternatively, just start typing the name of the package. The Package List will highlight the first package that matches the string you have typed.

Install a package.

To install a package from the repository:

Remove a package.

To remove a package from your local perl installation:

Upgrade a package.

To upgrade a package to the most recent version available in the repository:

PPM Preferences

Installation Areas can be selected and Repositories configured by clicking the PPM Preferences button or selecting Preferences from the Edit menu.


PPM allows for the addition of new install areas, which is useful for shared ActivePerl installations where the user does not have write permissions for the site and perl areas. New install areas are added by simply setting up new library directories for perl to search, and PPM will set up install areas to match. The easiest way to add library directories for perl is to specify them in the PERL5LIB environment variable, see the perlrun manpage for details. PPM will create etc, bin, html directories as needed when installing packages. If the last segment of the library directory path is lib then the other directories will be created as siblings of the lib directory, otherwise they will be subdirectories.


The Repositories tab lists the repositories that PPM is currently configured to use and allows you to add additional ones. Simple PPM repositories are just a directory containing ppm packages. You can create your own by putting packages in an HTTP, FTP directory or a locally accessible mount or filesystem directory.

To add a repository fill out the fields in the Add Repository pane and click Add.

To remove a repository, click the Delete
Repository icon next to it.

Enabled repositories show the Enabled
Repository icon; disabled ones show the Disabled Repository icon. Click these icons to toggle between states.

Default Repository

The base URL of the default PPM repository is:

The full URL is platform and version-specific, for example:

Additional Repositories A repository of Bioperl packages the "Bribes de Perl" (Scraps of Perl) repository (en Français et Anglais)

Additional Information

Creating an Install Area

On systems where ActivePerl is installed in a directory that is not writable by users (i.e. owned by root), a new perl library location can be defined with the PERL5LIB environment variable. PPM will recognize this library as an install area.

To create a new, user-writable install area:

  1. Make a directory for the library. For example:

        mkdir -p ~/perl/lib
  2. Set or modify the PERL5LIB environment variable using the command specific to your shell (e.g. set or export). To make this change persistent, add the command to the appropriate profile file for the shell. For example, in bash, add a line like the following to your .bash_profile or .bashrc file:

        PERL5LIB=~/perl/lib; export PERL5LIB
  3. Launch PPM and click the PPM Preferences button. In the Area tab, select the new install area to make it active.

Note: On Mac OS X, user-writable install areas called "ActivePerl" are created for all users during installation (in /Users/<username>/Library/ActivePerl).

Using PPMX Files (Business Edition)

If you need to install packages on systems without direct access to repositories, you can use PPMX files. These are compressed tarballs containing the PPD file for the package and the blib tree to be installed. You can download PPMX files from

Note: Access to ActiveState PPMX archives require a Business Edition license.

To use a PPMX file:

  1. Download the file and/or transfer it to a convenient directory on the target system.
  2. Install the package by specifying the ppmx file explicitly, rather than just the package name. For example
    ppm install c:\tmp\Date-Calc-6.3.ppmx

Some modules have dependencies that may cause them to fail to install if those packages are not available in a repository that PPM is connected to. You can use the ppm describe command to see what dependencies the package has, but those packages may have their own dependencies. The dependency chain has to be resolved manually by starting with the lowest common prerequisite package.

Unavailable Packages

Most modules available via PPM are not owned or maintained by ActiveState; we only pre-package those modules available from CPAN that can be built automatically.

Additionally, some packages are not available via PPM because of export restrictions or license incompatibility. Not all PPM packages in the repository are completely up-to-date or available for every platform.

Check package availability and build status on the PPM Index site. If a module that you require is not available via PPM, try building it using the CPAN shell as described below.

Creating PPM packages

Specify the AUTHOR and ABSTRACT parameters in the Makefile.PL. However you should only pass them to WriteMakefile if the version of the perl is greater than 5.005 - older perls do not have these parameters added and do not expect to see them. This is an example Makefile.PL:

  use ExtUtils::MakeMaker;
  # See lib/ExtUtils/ for details of how to influence
  # the contents of the Makefile that is written.
      'NAME' => 'Term::Control',
      'VERSION_FROM' => '', # finds $VERSION
      ($] ge '5.005') ? (
          'AUTHOR' => 'Johnny Doel (',
          'ABSTRACT' => 'Control the IO for terminals',
      ) : (),

Then you make the archive with the commands

  perl Makefile.PL

The resulting files are placed in the blib directory that is created when you run nmake. These files should be packed into an archive like this:

  tar cvf package.tar blib
gzip --best package.tar

You now have an archive called package.tar.gz. Then you generate the PPD file by:

  nmake ppd

You have to edit the resulting PPD file and add the location of the package archive into <CODEBASE HREF="" />. The location is relative to the PPD file.

You can get nmake from

PPM, Proxies and Firewalls

If you use a proxy server or firewall, you may need to set the http_proxy environment variable in order for PPM to work.

The http_proxy Environment Variable

Set the http_proxy variable with the hostname or IP address of the proxy server:


If the proxy server requires a user name and password, include them in the following form:


If the proxy server uses a port other than 80, include the port number:


Setting http_proxy

Windows 2012/2008

  1. From the System Manager click Change System Properties
  2. Select the Advanced tab, then click the Environment Variables button.
  3. Click New in the System variables panel.
  4. Add http_proxy with the appropriate proxy information (see examples above).

Windows 7/8

  1. Open the Advanced System Properties tab in the Control Panel (Control Panel > System Properties > Advanced > Environment Variables...).
  2. Click the Environment Variables button.
  3. Click New in the System variables panel.
  4. Add http_proxy with the appropriate proxy information (see examples above).

Mac OS X

The http_proxy should be set in two places on OS X:

Linux, Solaris or HP-UX

Set the http_proxy environment variable using the command specific to your shell (e.g. set or export). To make this change persistent, add the command to the appropriate profile file for the shell. For example, in bash, add a line like the following to your .bash_profile or .bashrc file:

    http_proxy=http://username:password@hostname:port;  export http_proxy

Using the CPAN shell

If you require a module that is not available via ppm, or you require a more recent version, you can build the module from CPAN sources. The CPAN shell is a command-line interface for fetching and building modules directly from CPAN archives. To run it, enter the following command:


Building modules from source requires the following components:


Mac OS X:

Linux and Solaris systems will normally have a compiler and a make utility installed by default.

See How to install CPAN modules into ActivePerl on the ActiveState blog for more information.