NAME
PPM - Perl Package Manager: locate, install, upgrade software packages.
SYNOPSIS
ppm genconfig
ppm help [command]
ppm install [--location=location] package1 [... packageN]
ppm query [--case|nocase] [--abstract|author] PATTERN
ppm remove package1 [... packageN]
ppm search [--case|nocase] [--location=location] [--abstract|author] PATTERN
ppm set [option]
ppm verify [--location=location] [--upgrade] [--force] [package1 ... packageN]
ppm version
ppm [--location=location]
DESCRIPTION
ppm is a utility intended to simplify the tasks of locating, installing, upgrading and removing software packages. It is a front-end to the functionality provided in PPM.pm. 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 runs in one of two modes: an interactive shell from which commands may be entered; and command-line mode, in which one specific action is performed per invocation of the program.
ppm uses files containing an extended form of the Open Software Description (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 extensions to OSD used by ppm are documented in PPM.ppd.
Using PPM
- Interactive mode
-
If ppm is invoked with no command specified, it is started in interactive mode. If the '--location' argument is specified, it is used as the search location, otherwise the repositories specified in the PPM data file are used.
The syntax of PPM commands is the same in interactive mode as it is in command-line mode. The 'help' command lists the available commands.
ppm commands may be abbreviated to their shortest unique form.
- Installing
-
ppm install [--location=location] package1 [... packageN]
Installs the specified software packages. Attempts to install from the URL or directory 'location' if the '--location' option is specfied.
The 'package' arguments may be either package names ('foo'), pathnames (p:/packages/foo.ppd) or URLs (http://www.ActiveState.com/packages/foo.ppd) to specific PPD files.
In the case where a package name is specified, and the '--location' option is not used, ppm will refer to the default repository locations.
See also: 'confirm' option.
- Removing
-
ppm remove package1 [... packageN]
Reads information from the PPD file for the named software package and removes the package from the system.
See also: 'confirm' option.
- Verifying
-
ppm verify [--location=location] [--upgrade] [--force] [package1 ... packageN]
Verifies that the currently installed packages are up to date. If no packages are specified as arguments, all installed packages will be verified.
If the '--upgrade' option is specified, any package for which an upgrade is available will be upgraded.
If the '--location' option is specified, upgrades will be looked for at the specified URL or directory.
If the '--force' option is specified, all currently installed packages will be reinstalled regardless of whether they are out of date or not.
See also: 'confirm' option.
- Querying
-
ppm query [--case|nocase] [--abstract|author] PATTERN
Searches for 'PATTERN' (a regular expression) in the name of any installed package. If a search is successful, information about the matching package(s) is displayed. If 'PATTERN' is omitted, information about all installed packages will be displayed.
If either '--abstract' or '--author' is specified, PATTERN will be searched for in the <ABSTRACT> or <AUTHOR> tags of the installed packages.
The '--case' and '--nocase' options can be used to override the default case-sensitivity search settings.
See also: 'case' option.
- Searching
-
ppm search [--case|nocase] [--location=location] [--abstract|author] PATTERN
Displays a list of any packages matching 'PATTERN' (a regular expression) available from the specified location. If 'PATTERN' is omitted, information about all available packages will be displayed.
If the '--location' option is specified, the specified URL or directory will be searched. If '--location' is not specified, the repository location as specified in the PPM data file will be searched.
If either '--abstract' or '--author' is specified, PATTERN will be searched for in the <ABSTRACT> or <AUTHOR> tags of the available packages.
The '--case' and '--nocase' options can be used to override the default case-sensitivity search settings.
See also: 'case' option.
- Error Recovery
-
ppm genconfig
This command will print a valid PPM config file (ppm.xml) to STDOUT. This can be useful if the PPM config file ever gets damaged leaving PPM unusable.
If required, this command should be run from a shell prompt:
C:\Perl\site\lib> ppm genconfig > ppm.xml
- Options
-
ppm set [option value]
Sets or displays current options. With no arguments, current option settings are displayed.
Available options:
build DIRECTORY - Changes the package build directory. case [1|0] - Sets case-sensitive searches. If one of '1' or '0' is not specified, the current setting is toggled. clean [1|0] - Sets removal of temporary files from package's build area, on successful installation of a package. If one of '1' or '0' is not specified, the current setting is toggled. confirm [1|0] - Sets confirmation of 'install', 'remove' and 'upgrade'. If one of '1' or '0' is not specified, the current setting is toggled. force_install [1|0] - Continue installing a package even if a dependency cannot be installed. more NUMBER - Causes output to pause after NUMBER lines have been displayed. Specifying '0' turns off this capability. set repository --remove NAME - Removes the repository 'NAME' from the list of repositories. set repository NAME LOCATION - Adds a repository to the list of PPD repositories for this session. 'NAME' is the name by which this repository will be referred; 'LOCATION' is a URL or directory name. root DIRECTORY - Changes the install root directory. Packages will be installed under this new root. save - Saves the current options as default options for future sessions. trace - Tracing level--default is 1, maximum is 4, 0 indicates no tracing. tracefile - File to contain tracing information, default is 'PPM.LOG'. verbose [1|0] - Display additional package information for 'query' and 'search' commands.
EXAMPLES
- ppm
-
Starts ppm in interactive mode, using the repository locations specified in the PPM data file. A session might look like this:
[show all available packages] PPM> search Packages available from P:\PACKAGES: bar [2.91 ] supplies bar methods for perl5. bax [0.072] module for manipulation of bax archives. baz [1.03 ] Interface to baz library foo [2.23 ] Foo parser class [list what has already been installed] PPM> query bax [0.071] module for manipulation of bax archives. baz [1.02 ] Interface to baz library [install a package] PPM> install foo Install package foo? (y/N): y [...] [toggle confirmations] PPM> set confirm Commands will not be confirmed. [see if 'baz' is up-to-date] PPM> verify baz An upgrade to package 'baz' is available. [upgrade 'baz'] PPM> verify --upgrade baz [...] [forced upgrade of 'baz'] PPM> verify --upgrade --force baz [...] [toggle case-sensitive searches] PPM> set case Case-sensitive searches will be performed. [display all available packages beginning with 'b'] PPM> search ^b bar [2.91 ] supplies bar methods for perl5. bax [0.072] module for manipulation of bax archives. baz [1.03 ] Interface to baz library [search for installed packages containing 'baz' in the ABSTRACT tag] PPM> query --abstract baz Matching packages found at P:\PACKAGES: baz [1.03 ] Interface to baz library PPM> quit
- ppm install http://www.ActiveState.com/packages/foo.ppd
-
Installs the software package 'foo' based on the information in the PPD obtained from the specified URL.
- ppm verify --upgrade foo
-
Compares the currently installed version of the software package 'foo' to the one available according to the PPD obtained from the location specified for this package in the PPM data file, and upgrades to a newer version if available.
- ppm verify --location=P:\PACKAGES --upgrade foo
-
Compares the currently installed version of the software package 'foo' to the one available according to the PPD obtained from the specified directory, and upgrades to a newer version if available.
- ppm verify --upgrade --force
-
Forces verification and reinstalls every installed package on the system, using upgrade locations specified in the PPM data file.
- ppm search --location=http://www.ActiveState.com/packages
-
Displays the packages with PPD files available at the specified location.
-
Searches the specified location for any package with an <AUTHOR> tag containing the string 'ActiveState'. On a successful search, the package name and the matching string are displayed.
ENVIRONMENT VARIABLES
- HTTP_proxy
-
If the environment variable 'HTTP_proxy' is set, then it will be used as the address of a proxy server for accessing the Internet.
The value should be of the form: 'http://proxy:port'.
FILES
The following files are fully described in the 'Files' section of PPM:ppm.
- package.ppd
-
A description of a software package, in extended Open Software Description (OSD) format. More information on this file format can be found in PPM::ppd.
- ppm.xml - PPM data file.
-
An XML format file containing information about the local system, specifics regarding the locations from which PPM obtains PPD files, and the installation details for any package installed by ppm.
This file usually resides in '[perl]/site/lib'. If the environment variable 'PPM_DAT' is set, its value will be used as the full pathname to a PPM data file. If all else fails, ppm will look for a data file in the current directory.
AUTHOR
Murray Nesbitt, <murray@ActiveState.com>
CREDITS
Thanks to my colleague and friend Jan Dubois <jand@ActiveState.com>.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 774:
You forgot a '=back' before '=head1'