Using 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, have
access to a PPM repository on a
local hard drive or network share, or have access to a mounted ActiveState
ActiveCD.
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.
To launch PPM's graphical user interface, run ppm
without any command line arguments:
ppm
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:
All
packages: Displays all packages installed locally and
available in the repository.
Installed packages: Displays all installed
packages.
Upgradable
packages: Displays packages for which an upgrade is available
from the repository.
Packages to
install/remove: Displays packages marked for installation or removal.
Mark
for install: Marks the selected packages for installation or
upgrade.
Mark
for remove: Marks the selected packages for removal.
Run marked
actions: Runs all marked actions (i.e. install, upgrade,
remove)
Refresh all
data: Refreshes the list view.
PPM
Preferences: Opens the PPM Preferences dialog box.
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:
- Name
- Abstract
- Name or Abstract (default)
- Author
The Package List pane can display the following columns of package
information:
- Package Name: The name of the package.
- Area: Where the package is installed. See install areas below.
- Installed: Version number of the installed package.
- Available: Version number of the package in
the repository.
- Abstract: A short description of the package.
- Author: Name and email address of the package's
author.
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.
All PPM operations and configuration can also be performed at the
command line. See the ppm man page or
'ppm help' for more information.
To find a package in the repository:
- Click the All packages button,
- Enter text from the package's name or abstract in the Filter field
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.
To install a package from the repository:
- Click on the desired package in the Package List to select it.
- Mark the package by:
- Clicking the Mark for install button or,
- Hitting the "+" key or,
- Selecting Install <package-name>
from the Action menu or,
- Right-clicking the selection and choosing
Install <package-name> from the
context menu.
- Click the Run marked actions button or select
Run Marked Actions (Ctrl-Enter) from the File menu.
To remove a package from your local perl installation:
- Click on the Installed package in the Package List
to select it. You may want to use the Installed
packages button to filter the list.
- Mark the package by:
- Clicking the Mark for remove button or,
- Hitting the "-" key or,
- Selecting Remove <package-name>
from the Action menu or,
- Right-clicking the selection and choosing
Remove <package-name> from the
context menu.
- Click the Run marked actions button or select
Run Marked Actions (Ctrl-Enter) from the File menu.
To upgrade a package to the most recent version available in the
repository:
- Click on the desired package in the Package List
to select it. You may want to use the Upgradable
packages button to filter the list.
- Mark the package by:
- Clicking the Mark for install button or,
- Hitting the "+" key or,
- Selecting Install <package-name>
from the Action menu or,
- Right-clicking the selection and choosing
Install <package-name> from the
context menu.
- Click the Run marked actions button or select
Run Marked Actions (Ctrl-Enter) from the File menu.
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 icon next to it.
Enabled repositories show the icon; disabled ones show the icon.
Click these icons to toggle between states.
Note: ActiveState does not maintain PPM repositories
for AIX, Solaris x86, Windows x86_64, or Linux x86_64. Use the CPAN shell to install perl modules on these
platforms.
| http://cpan.uwinnipeg.ca/htdocs/faqs/cpan-search.html |
Randy Kobes' excellent
package search engine, with browsable categories of the packages
at the University of Winnipeg's CPAN site, allows you to search
for modules and displays the availability of Win32 ppm packages
from a number of repositories. |
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:
Make a directory for the library. For example:
mkdir -p ~/perl/lib
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
- 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).
As an alternate method for installing packages, you can download zip files
for the packages that you need from
http://ppm.activestate.com/PPMPackages/zips/. To use these files:
- Unzip the package to a temporary directory.
- Install the package by specifying the ppd file directly:
ppm install c:\tmp\module-name.ppd
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.
Cryptographic Packages Unlike the United States, the Export
Control List of Canada places no significant restriction on the export of
cryptographic software; however, the Canadian Federal Government does require
that companies, organizations or individuals that wish to distribute
cryptographic software get a permit in order to do so. ActiveState does not
currently have this permission, so you must currently access other repositories
for the following modules:
Crypt-Blowfish, Crypt-Blowfish_PP
Crypt-CAST5, Crypt-CAST5_PP
Crypt-DH
Crypt-DSA, Crypt-RSA
Crypt-GPG
Crypt-GOST, Crypt-GOST_PP
Crypt-IDEA
Crypt-OpenPGP, Crypt-PGP2, Crypt-PGP5, Crypt-PGPSimple
Crypt-OpenSSL-DSA, Crypt-OpenSSL-RSA, Crypt-OpenSSL-SMIME
Crypt-RC4, Crypt-RC5, Crypt-RC6
Crypt-RIPEMD160
Crypt-Rijndael, Crypt-Rijndael_PP
Crypt-Serpent
Crypt-Twofish, Crypt-Twofish2, TwoFish
Crypt-SSLeay, Net_SSLeay
DBD::Oracle Oracle no longer provides the Oracle client
libraries for free, so we can no longer provide DBD Oracle as a PPM/PPM3 module.
The DBD-Oracle package for ActivePerl 5.6 is the last package compiled before
the licensing changed that is still available on our site. If you wish to
compile this module locally, the source may be obtained from www.cpan.org.
Instructions on using CPAN are at:
http://aspn.activestate.com/ASPN/Reference/Products/ActivePerl/lib/CPAN.html.
If you are using Windows, an easy workaround for you might be just to use
DBD-ODBC instead.
GD module The GD module currently is not available from the
ActiveState ppm server because of the difficulty of incorporating it into our
automated build process. The GD module is available from the University of
Winnipeg's repository.
ActiveState does not maintain or own the vast majority of the modules
available via PPM. We only pre-package those modules available from CPAN that can be built automatically. As
a result, not all PPM packages in the repository are completely
up-to-date or available for every platform.
If you require a package or package version that is not available in
a PPM repository, you can install it using the CPAN shell.
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/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
'NAME' => 'Term::Control',
'VERSION_FROM' => 'Control.pm', # finds $VERSION
($] ge '5.005') ? (
'AUTHOR' => 'Johnny Doel (johnny@doel.org)',
'ABSTRACT' => 'Control the
IO for terminals',
) : (),
);
Then you make the archive with the commands
perl Makefile.PL
nmake
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 http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe.
If you use a proxy server or firewall, you may need to set the
http_proxy environment variable in order for PPM to
work.
Set the http_proxy variable with the hostname or IP
address of the proxy server:
http_proxy=http://proxy.example.org
If the proxy server requires a user name and password, include them
in the following form:
http_proxy=http://username:password@proxy.example.org
If the proxy server uses a port other than 80, include the port
number:
http_proxy=http://username:password@proxy.example.org:8080
Windows XP
- Open the Control Panel and click the
System icon.
The System Properties dialog is displayed.
- On the Advanced tab, click on Environment
Variables.
The Environment Variables dialog is displayed.
- Click New in the System variables
panel.
The New Sytem Variable dialog is displayed.
- Add
http_proxy with the appropriate proxy
information (see examples above).
Windows 200x
- Right click on My Computer.
- Click on Properties and select the
Advanced tab.
- Click "Environment Variables".
The "System Variables" dialog appears.
- Click New and add
http_proxy, with
the appropriate proxy information (see examples above).
Windows NT
- Right click on My Computer.
- Click on Properties, select the
Environment tab.
- Add
http_proxy with the appropriate proxy
information (see examples above).
Windows 95/98/ME
- Open the C:\autoexec.bat file for editing (e.g. in
Notepad).
- Add a "SET" line like the following (see examples above):
SET http_proxy=http://username:password@hostname:port
- Restart your computer for the change to take effect.
Mac OS X
The http_proxy should be set in two places on OS
X:
- Shell: Add a line like the following in
.bash_profile (/Users/<name>/.bash_profile):
http_proxy=http://username:password@hostname:port; export http_proxy
This setting applies to PPM when it is launched from or used at the
command line.
- Desktop: Add an entry like the following in your
environment.plist file
(/Users/<name>/.MacOSX/environment.plist):
<key>http_proxy</key>
<string>http://username:password@hostname:port</string>
This setting applies to PPM when it is launched by clicking the PPM
icon.
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
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:
cpan
Building modules from source requires the following components:
Windows:
Mac OS X:
Linux and Solaris systems will normally have a compiler and a
make utility installed by default.
|