ActivePerl Documentation
|
NAMEActivePerl-faq2 - Using PPM to install modules DESCRIPTIONHow to install and upgrade modules for ActivePerl using PPM What is the Perl Package Manager (PPM)?The Perl Package Manager (PPM) provides a command line interface for managing your Perl modules and extensions (packages). PPM allows you to access package repositories, install and remove packages from your system, and update packages you previously installed using PPM with the latest versions. How do I install PPM?PPM is installed when you install ActivePerl. How do I run PPM?Before you run PPM, you should be connected to the Internet. If your Internet connection is via a firewall or proxy, you should set the environment variable 'HTTP_proxy' to the name of this proxy server. If your proxy server requires a username and password, the environment variables 'HTTP_proxy_user' and 'HTTP_proxy_pass' should be set to these values. See PPM, Proxies and Firewalls for more information. PPM can then be run by typing 'ppm' in a command prompt window. How do I use PPM?Quick start: at the PPM command prompt, type ' If you find the listing of packages scrolls by too quickly, you may want to
use the command ' By default, PPM will use the ActiveState package repository, but this too can
be configured using the ' Below is a listing of key PPM commands (you can type '
A pattern is a search string just like the regular expressions - for example if you search for with this command
(which means 'search for packages in which the characters ODBC and/or the characters DBI are present in that order') you get a result like this
Note that if you use 'search /abstract [pattern]' the search will only include the ABSTRACT section of the package files. Where are the package repositories?By default, PPM will use the ActiveState package repository, but there are other repositories on the Internet. At the moment there are these repositories: Note: most of these repositories are for ActivePerl 5xx builds only, and are not compatible with ActivePerl 6xx builds.
To use these package repositories you start PPM and at the prompt type
where NAME is a name by which you want to reference the repository from PPM and URL is the URL to the repository. You could for example type
The next time you do a 'search' you will not only search the ActiveState package repository but also the repositories you have added. Before you exit PPM you should save the changes to the configuration by issuing the command 'set save'. How do I make a PPM package?If you want to make a PPM package for use on other machine you can do it like this: 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:
Then you make the archive with the commands
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:
You now have an archive called package.tar.gz. Then you generate the PPD file by:
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 ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe. You can get tar and gzip from http://www.itribe.net/virtunix/. PPM, Proxies and FirewallsIf you use a proxy server or firewall, you might have trouble running PPM. Here is the solution.
AUTHOR AND COPYRIGHTThis FAQ was originally assembled and maintained by Evangelo Prodromou. It has been revised and updated by Brian Jepson of O'Reilly & Associates, David Grove, David Dmytryshyn, and Murray Nesbitt of ActiveState, Henning Michael Møller-Nielsen of RTO, Kevin Meltzer, and David Sparks of ActiveState. This FAQ is in the public domain. If you use it, however, please ensure that you give credit to the original authors.
| |||||||||||||||||||||||||||||||||||||||||||||||