ppm2 - Perl Package Manager: locate, install, upgrade software packages.


NAME

ppm2 - Perl Package Manager: locate, install, upgrade software packages.


SYNOPSIS

 ppm2 genconfig
 ppm2 help [command]
 ppm2 install [--location=location] package1 [... packageN]
 ppm2 query [--case|nocase] [--abstract|author] PATTERN
 ppm2 remove package1 [... packageN]
 ppm2 search [--case|nocase] [--location=location] [--abstract|author] PATTERN
 ppm2 set [option]
 ppm2 verify [--location=location] [--upgrade] [--force] [package1 ... packageN]
 ppm2 version
 ppm2 [--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.

    NOTE: This document describes PPM version 2.  There is a newer
    version of PPM, which may be available on your system as 'ppm3'.
    The default 'ppm' program may either be the same as 'ppm2' or
    'ppm3' depending on your version of ActivePerl.

ppm2 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.

ppm2 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 ppm2 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.

ppm2 commands may be abbreviated to their shortest unique form.

Installing
 ppm2 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, ppm2 will refer to the default repository locations.

See also: 'confirm' option.

Removing
 ppm2 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
 ppm2 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
 ppm2 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
 ppm2 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
 ppm2 genconfig
 ppm2 getconfig

The genconfig 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> ppm2 genconfig > ppm.xml

The getconfig command prints the location of the PPM configuration file used at PPM startup.

Options
 ppm2 set [option value]

Sets or displays current options. With no arguments, current option settings are displayed. For options that accept '1' or '0', specifying '1' sets the option, and '0' unsets it.

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.
    downloadstatus NUMBER
        - If non-zero, updates the download status after each NUMBER 
          of bytes transferred during an 'install'.  This can be
          reassuring when installing a large package (e.g. Tk) over
          a low-speed connection.
    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.
    rebuildhtml [1|0]
        - Sets regeneration of HTML documentation after installing
          a package.  If one of '1' or '0' is not specified, the
          current setting is toggled.
    repository --remove NAME
        - Removes the repository 'NAME' from the list of repositories.
    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

ppm2
Starts ppm2 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

ppm2 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.

ppm2 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.

ppm2 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.

ppm2 verify --upgrade --force
Forces verification and reinstalls every installed package on the system, using upgrade locations specified in the PPM data file.

ppm2 search --location=http://ppm.ActiveState.com/PPMpackages/5.6
Displays the packages with PPD files available at the specified location.

ppm2 search --location=P:\PACKAGES --author ActiveState
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 ppm2.

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, ppm2 will look for a data file in the current directory.


AUTHOR

Murray Nesbitt


CREDITS

 ppm2 - Perl Package Manager: locate, install, upgrade software packages.