The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

Perl Package Manager (PPM) Summary

Introduction

PPM is a program and API intended to simplify the process of locating,
installing, removing, upgrading and otherwise maintaining Perl packages.

To obtain information about available software packages, PPM refers to
files which are in an extended form of the Open Software Description
(OSD) specification.  These description files are referred to as Perl
Package Description (PPD) files, and are written in Extensible Markup
Language (XML).  The glossary at the end of this document contains
further information about these terms.

Each package has an individual PPD file describing attributes such as
package location, installation script, abstract, licensing information,
etc.


Usage

In a typical scenario, PPM will look at a central PPD repository to
obtain a list of available packages.  The PPD repository may be a
remote location accessed using Internet protocols such as HTTP or FTP,
or a locally mounted (or shared) directory.  Since the PPD for a package
contains the information needed to retrieve the installation archive, the
software packages themselves need not be at the same location as the PPDs.

To perform a package installation, PPM consults the package's PPD to
determine the location of the package.  The package will usually be in
'[package].tar.gz' format, but may be in any format the install script
is written to handle.  The file is retrieved and placed in a local
'build' directory, where it is uncompressed and unarchived if necessary.
PPM will then use installation instructions provided in the PPD in the
form of a Perl script.  If there is no installation script, the package
is assumed to be pre-built for a specific platform, and the required
files are copied to the appropriate locations on the local system.

PPM performs basic verifying and upgrading by comparing information from
the PPD available at the repository to information saved during a previous
installation of the same package.  PPM provides the ability to verify
that the most recent version of a package is installed, and to upgrade a
specific package (or all currently installed packages) if it is outdated.


Features

In addition to basic installation and upgrading, PPM provides some
functionality not available in current Perl package tools, such as
CPAN.pm, and overcomes some of the limitations of these existing tools.

PPM provides the ability to search for specific package capabilities using
keywords in the abstract, title, or other attributes of the PPD file.
This makes, for example, locating a package that provides a broad range
of functionality (e.g., 'LWP') much easier than by using existing tools.

PPM can perform simple installations of pre-built distributions for
specific platforms.  This greatly simplifies the task of installing
and upgrading packages on platforms for which there is no native
'make' command.

PPM has the concept of software dependencies, and thus the ability to
automatically install any additional packages on which a package depends.
This concept of a dependency extends to commands such as 'make', so that a
package that is in source form will not be installed on a system without a
'make' command.

Finally, PPM has been designed to be used with any of a number of user
interfaces: command-line, interactive text-mode, GUI, Web browser, etc.
This allows for the development of tools to appeal to a broad range of
users with various levels of sophistication.


Samples

The following is a sample PPD file.

<SOFTPKG NAME="AtExit" VERSION="1,0,2,0">
    <TITLE>AtExit</TITLE>
    <ABSTRACT>Performs ANSI-C style exit processing for Perl5 programs</ABSTRACT>
    <AUTHOR>Brad Appleton</AUTHOR>
    <LICENSE HREF="http://www.ActiveState.com/packages/license.html" />
    <IMPLEMENTATION>
        <OS VALUE="WinNT" />
        <OS VALUE="Win95" />
        <PROCESSOR VALUE="x86" />
        <DEPENDENCY HREF="http://www.ActiveState.com/packages/Array-PrintCols.ppd" />
        <CODEBASE HREF="http://www.ActiveState.com/packages/AtExit-1.02.tar" />
        <INSTALL>
        </INSTALL>
        <UNINSTALL>
        </UNINSTALL>
    </IMPLEMENTATION>

    <IMPLEMENTATION>
        <DEPENDENCY HREF="http://www.ActiveState.com/packages/Array-PrintCols.ppd" />
        <CODEBASE HREF="http://ftp.cdrom.com/pub/perl/CPAN/modules/by-module/AtExit/AtExit-1.02.tar" />
        <INSTALL>
            system("make"); ;;
            system("make test"); ;;
            system("make install"); ;;
    </IMPLEMENTATION>
</SOFTPKG>

In this example, the package 'AtExit' is installed as a pre-built module
on Windows NT or 95 on an Intel x86 chip, since no install script has
been provided.  On other platforms, the source package is retrieved
and built according to the installation script.  The dependency on
'Array-PrintCols' means that 'AtExit' will only be installed if
'Array-PrintCols' can be successfully installed.


Glossary of terms

dependency
    - a software package necessary for installation or operation of another
      package

OSD 
    - Open Software Description (see http://www.w3.org/TR/NOTE-OSD.html)

PPD
    - Perl Package Description file

PPD repository
    - an Internet location or local directory, to which PPM looks for PPD files

PPM
    - Perl Package Manager

pre-built package
    - a software package consisting of ready-to-install files (e.g. compiled
      C objects) for use on a specific platform

XML
    - Extensible Markup Language (see http://www.sil.org/sgml/xml.html)