PPM is a group of functions intended to simplify the tasks of locating,
installing, upgrading and removing software 'packages'. It can determine
if the most recent version of a software package is installed on a system,
and can install or upgrade that package from a local or remote host.
PPM uses files containing a modified form of the Open Software Distribution
(OSD) specification for information about software packages.
These description files, which are written in Extensible Markup
Language (XML) code, are referred to as 'PPD' files. Information about
OSD can be found at the W3C web site (at the time of this writing,
http://www.w3.org/TR/NOTE-OSD.html). The modifications to OSD used by PPM
are documented in PPM::ppd.
PPD files for packages are generated from POD files using the pod2ppd
Installs the specified package onto the local system. 'package' may
be a simple package name ('foo'), a pathname (P:\PACKAGES\FOO.PPD) or
a URL (HTTP://www.ActiveState.com/packages/foo.ppd). In the case of a
simple package name, the function will look for the package's PPD file
at 'location', if provided; otherwise, it will use information stored
in the PPM data file (see 'Files' section below) to locate the PPD file
for the requested package. The package's files will be installed under
the directory specified in 'root'; if not specified the default value
of 'root' will be used.
The function uses the values stored in the PPM data file to determine the
local operating system, operating system version and CPU type. If the PPD
for this package contains implementations for different platforms, these
values will be used to determine which one is installed.
InstallPackage() updates the PPM data file with information about the package
installation. It stores a copy of the PPD used for installation, as well
as the location from which this PPD was obtained. This location will
become the default PPD location for this package.
During an installation, the following actions are performed:
- the PPD file for the package is read
- a directory for this package is created in the directory specified in
<BUILDDIR> in the PPM data file.
- the file specified with the <CODEBASE> tag in the PPD file is
retrieved/copied into the directory created above.
- the package is unarchived in the directory created for this package
- individual files from the archive are installed in the appropriate
directories of the local Perl installation.
- perllocal.pod is updated with the install information.
- if provided, the <INSTALL> script from the PPD is executed in the
directory created above.
- information about the installation is stored in the PPM data file.
Removes the specified package from the system. Reads the package's PPD
(stored during installation) for removal details. If 'force' is
specified, even a package required by PPM will be removed (useful
when installing an upgrade).
Reads a PPD file for 'package', and compares the currently installed
version of 'package' to the version available according to the PPD.
The PPD file is expected to be on a local directory or remote site
specified either in the PPM data file or in the 'location' argument.
The 'location' argument may be a directory location or a URL.
The 'upgrade' argument forces an upgrade if the installed package is
The PPD file for each package will initially be searched for at
'location', and if not found will then be searched for using the
locations specified in the PPM data file.
Returns a hash containing information about all installed packages.
By default, a list of all installed packages is returned. If a regular
expression 'searchRE' is specified, only packages matching it are
returned. If 'searchtag' is specified, the pattern match is applied
to the appropriate tag (e.g., ABSTRACT).
The data comes from the PPM data file, which contains installation
information about each installed package.
Returns a hash, with 'location' being the key, and arrays of all packages
with package description (PPD) files available at 'location' as its
elements. 'location' may be either a remote address or a directory path.
If 'location' is not specified, the default location as specified in
the PPM data file will be used.
Attempts to retrieve the summary file associated with the specified repository,
or from all repositories if 'location' is not specified. The return value
is a hash with the key being the repository, and the data being another
hash of package name keys, and package detail data.
Compares the currently installed version of the software package 'foo' to
the one available according to the PPD obtained from the package-specific
location provided in the PPM data file, and upgrades to a newer
version if available. If a location for this specific package is not
given in PPM data file, a default location is searched.
If the environment variable 'HTTP_proxy' is set, then it will
be used as the address of a proxy for accessing the Internet.
If the environment variables 'HTTP_proxy_user' and 'HTTP_proxy_pass'
are set, they will be used as the login and password for the
proxy server. If a proxy requires a certain User-Agent value
(e.g. "Mozilla/5.0"), this can be set using the 'HTTP_proxy_agent'
A description of a software package, in Perl Package Distribution (PPD)
format. More information on this file format can be found in XML::PPD.
PPM stores a copy of the PPD it uses to install or upgrade any software
The XML format file in which PPM stores configuration and package
installation information. This file is created when PPM is installed,
and under normal circumstances should never require modification other
than by PPM itself. For more information on this file, refer to