ActiveState!

ActivePerl Documentation
Table of Contents

(Usage Statistics)
(about this ver)


* Getting Started
    * Welcome To ActivePerl
    * Release Notes
    * Readme
    * ActivePerl Change Log
* Install Notes
    * Linux
    * Solaris
    * Windows
* ActivePerl Components
    * Overview
    * PPM
    * Windows Specifics
       * OLE Browser
       * PerlScript
       * Perl for ISAPI
       * PerlEZ
* ActivePerl FAQ
    * Introduction
    * Availability & Install
    * Using PPM
    * Docs & Support
    * Windows Specifics
       * Perl for ISAPI
       * Windows 9X/NT/2000
       * Quirks
       * Web Server Config
       * Web programming
       * Programming
       * Modules & Samples
       * Embedding & Extending
       * Using OLE with Perl
* Windows Scripting
    * Active Server Pages
    * Windows Script Host
    * Windows Script Components

Core Perl Documentation


* perl
* perlfaq
* perltoc
* perlbook

* perlsyn
* perldata
* perlop
* perlreftut
* perldsc
* perllol

* perllexwarn
* perldebug

* perlrun
* perlfunc
* perlopentut
* perlvar
* perlsub
* perlmod
* perlpod

* perlstyle
* perlmodlib
* perlmodinstall
* perltrap
* perlport
* perlsec

* perlref
* perlre
* perlform
* perllocale
* perlunicode

* perlboot
* perltoot
* perltootc
* perlobj
* perlbot
* perltie

* perlipc
* perlnumber
* perlfork
* perlthrtut

* perldiag
* perlfaq1
* perlfaq2
* perlfaq3
* perlfaq4
* perlfaq5
* perlfaq6
* perlfaq7
* perlfaq8
* perlfaq9

* perlcompile

* perlembed
* perlxstut
* perlxs
* perlguts
* perlcall
* perlfilter
* perldbmfilter
* perlapi
* perlintern
* perlapio
* perltodo
* perlhack

* perlhist
* perldelta
* perl5005delta
* perl5004delta

* perlamiga
* perlcygwin
* perldos
* perlhpux
* perlmachten
* perlos2
* perlos390
* perlvms
* perlwin32

Pragmas


* attributes
* attrs
* autouse
* base
* blib
* bytes
* charnames
* constant
* diagnostics
* fields
* filetest
* integer
* less
* lib
* locale
* lwpcook
* open
* ops
* overload
* perllocal
* re
* sigtrap
* strict
* subs
* utf8
* vars
* warnings

Libraries


* ActivePerl
    * DocTools
        * TOC
            * RDF
* AnyDBM_File
* Archive
    * Tar
* AutoLoader
* AutoSplit
* B
    * Asmdata
    * Assembler
    * Bblock
    * Bytecode
    * C
    * CC
    * Debug
    * Deparse
    * Disassembler
    * Lint
    * Showlex
    * Stackobj
    * Terse
    * Xref
* Benchmark
* Bundle
    * LWP
* ByteLoader
* Carp
    * Heavy
* CGI
    * Apache
    * Carp
    * Cookie
    * Fast
    * Pretty
    * Push
    * Switch
* Class
    * Struct
* Compress
    * Zlib
* Config
* CPAN
    * FirstTime
    * Nox
* Cwd
* Data
    * Dumper
* DB
* Devel
    * DProf
    * Peek
    * SelfStubber
* Digest
    * HMAC
    * HMAC_MD5
    * HMAC_SHA1
    * MD2
    * MD5
    * SHA1
* DirHandle
* Dumpvalue
* DynaLoader
* English
* Env
* Errno
* Exporter
    * Heavy
* ExtUtils
    * Command
    * Embed
    * Install
    * Installed
    * Liblist
    * MakeMaker
    * Manifest
    * Miniperl
    * Mkbootstrap
    * Mksymlists
    * MM_Cygwin
    * MM_OS2
    * MM_Unix
    * MM_VMS
    * MM_Win32
    * Packlist
    * testlib
* Fatal
* Fcntl
* File
    * Basename
    * CheckTree
    * Compare
    * Copy
    * CounterFile
    * DosGlob
    * Find
    * Glob
    * Listing
    * Path
    * Spec
        * Functions
        * Mac
        * OS2
        * Unix
        * VMS
        * Win32
    * stat
* FileCache
* FileHandle
* FindBin
* Font
    * AFM
* Getopt
    * Long
    * Std
* HTML
    * AsSubs
    * Element
    * Entities
    * Filter
    * Form
    * FormatPS
    * Formatter
    * FormatText
    * HeadParser
    * LinkExtor
    * Parse
    * Parser
    * TokeParser
    * TreeBuilder
* HTTP
    * Cookies
    * Daemon
    * Date
    * Headers
        * Util
    * Message
    * Negotiate
    * Request
        * Common
    * Response
    * Status
* I18N
    * Collate
* IO
    * Dir
    * File
    * Handle
    * Pipe
    * Poll
    * Seekable
    * Select
    * Socket
        * INET
        * UNIX
* IPC
    * Msg
    * Open2
    * Open3
    * Semaphore
    * SysV
* LWP
    * Debug
    * MediaTypes
    * MemberMixin
    * Protocol
    * RobotUA
    * Simple
    * UserAgent
* Math
    * BigFloat
    * BigInt
    * Complex
    * Trig
* MD5
* MIME
    * Base64
    * QuotedPrint
* NDBM_File
* Net
    * Cmd
    * Config
    * Domain
    * DummyInetd
    * FTP
    * hostent
    * libnetFAQ
    * netent
    * Netrc
    * NNTP
    * PH
    * Ping
    * POP3
    * protoent
    * servent
    * SMTP
    * SNPP
    * Time
* O
* ODBM_File
* Opcode
* Pod
    * Checker
    * Find
    * Html
    * InputObjects
    * Man
    * Parser
    * ParseUtils
    * Plainer
    * Select
    * Text
        * Color
        * Termcap
    * Usage
* POSIX
* PPM
    * SOAPClient
    * SOAPServer
* Safe
* SDBM_File
* Search
    * Dict
* SelectSaver
* SelfLoader
* SHA
* Shell
* SOAP
    * Defs
    * Envelope
    * EnvelopeMaker
    * GenericHashSerializer
    * GenericInputStream
    * GenericScalarSerializer
    * Lite
    * OutputStream
    * Packager
    * Parser
    * Transport
        * HTTP
            * Apache
            * CGI
            * Client
            * Server
        * LOCAL
        * MAILTO
        * POP3
        * TCP
    * TypeMapper
* Socket
* Symbol
* Sys
    * Hostname
    * Syslog
* Term
    * ANSIColor
    * Cap
    * Complete
    * ReadLine
* Test
    * Harness
* Text
    * Abbrev
    * ParseWords
    * Soundex
    * Tabs
    * Wrap
* Thread
    * Queue
    * Semaphore
    * Signal
    * Specific
* Tie
    * Array
    * Handle
    * Hash
    * RefHash
    * Scalar
    * SubstrHash
* Time
    * gmtime
    * Local
    * localtime
    * tm
* UDDI
    * Lite
* UNIVERSAL
* URI
    * data
    * Escape
    * file
    * Heuristic
    * ldap
    * URL
    * WithBase
* User
    * grent
    * pwent
* Win32
    * AuthenticateUser
    * ChangeNotify
    * Clipboard
    * Console
    * Event
    * EventLog
    * File
    * FileSecurity
    * Internet
    * IPC
    * Mutex
    * NetAdmin
    * NetResource
    * ODBC
    * OLE
        * Const
        * Enum
        * NEWS
        * NLS
        * TPJ
        * Variant
    * PerfLib
    * Pipe
    * Process
    * Registry
    * Semaphore
    * Service
    * Sound
    * TieRegistry
* Win32API
    * File
    * Net
    * Registry
* WWW
    * RobotRules
        * AnyDBM_File
* XML
    * Element
    * Parser
        * Expat
    * PPD
    * PPMConfig
    * ValidatingElement
* XSLoader

 ActivePerl FAQ


NAME

ActivePerl-faq2 - Using PPM to install modules


DESCRIPTION

How 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 'search' to get a listing of all available packages, then type 'install <packagename>', where <packagename> is the name of a package displayed by the 'search' command. To list the packages you have previously installed using PPM, use the 'query' command.

If you find the listing of packages scrolls by too quickly, you may want to use the command 'set more <number>' to pause the listing after <number> packages have been displayed. Use the 'set save' command to save this configuration for future PPM sessions.

By default, PPM will use the ActiveState package repository, but this too can be configured using the 'set' command. See below in Where are the package repositories?.

Below is a listing of key PPM commands (you can type 'help <command>' at the PPM prompt for usage details for a particular <command>). Items in [brackets] are optional.

Command Function
genconfig prints a minimal PPM configuration file to STDOUT [Note: genconfig only works from the command-line]
help [command] lists available commands, or help on 'command'.
info [package1...] prints a summary of installed packages.
install package1 [package2...] installs specified packages.
quit exits the program.
query [pattern] lists installed packages, or packages containing pattern.
query /abstract [pattern] lists descriptions of installed packages, or package descriptions containing pattern.
remove package1 [package2...] removes the specified packages from the system.
search [pattern] lists available packages, or packages containing pattern.
search /abstract [pattern] lists descriptions of available packages, or package descriptions containing pattern.
set set/display current options.
set save save current options.
verify [package1...] verifies currently installed packages are up to date.
verify /upgrade [package1...] installs available package upgrades.

A pattern is a search string just like the regular expressions - for example if you search for with this command

search ODBC|DBI

(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

Apache-DBI
DBD-ODBC
DBI
FindBin
Win32-ODBC

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.

http://www.ActiveState.com/PPMPackages/5.6 The default package repository from ActiveState
http://Jenda.Krynicky.cz/perl Jan Krynicky's package repository
http://www.roth.net/perl/packages/ Roth Consulting's package repository
http://www.xray.mpe.mpg.de/~ach/ptk/ppm Achim Bohnet's package repository
http://rto.dk/packages/ RTO's packages repository (mostly mirrors of the above)

http://www.fastnetltd.ndirect.co.uk/Perl/zips/ Fastnet Software Ltd's packages - not directly accessible from PPM at present

To use these package repositories you start PPM and at the prompt type

set repository NAME URL

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

set repository JENDA http://Jenda.Krynicky.cz/perl

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:

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 ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe. You can get tar and gzip from http://www.itribe.net/virtunix/.


PPM, Proxies and Firewalls

If you use a proxy server or firewall, you might have trouble running PPM. Here is the solution.

NOTE: If none of the changes in this document work for you, you may download individual packages from here [ActivePerl 613 and later] or here [ActivePerl 522 and earlier] and install them according to the directions in the README file contained within the ZIP file. If you want, you can also keep a local repository, with several .ppd files in a permanent repository directory, and their .tar.gz files in an x86 directory beneath that.

  1. Set Environment Vars

Up to three environment variables need to be set.

Under Windows NT
Right click on "My Computer", click on "properties", select the "environment" tab. These are your environment settings. Make the following changes:

  1. Add the setting HTTP_proxy, with your proxy name as the value (you must include "http://" ), followed by a colon and the proxy port, if applicable; e.g., "http://proxy:8080"
  2. If you require a user name and/or password to access your proxy, add the settings HTTP_proxy_user and HTTP_proxy_pass, with your user name and password as the respective values

Under Windows 95
In your AUTOEXEC.BAT file, place the following lines then reboot so the changes can take effect:

  1. SET HTTP_proxy=<your proxy server (you must include "http://" >, followed by a colon and the proxy port, if applicable; e.g., SET HTTP_proxy=http://proxy:8080
  2. SET HTTP_proxy_user=<your user name> (if required)
  3. SET HTTP_proxy_pass=<your password> (if required)

  1. Try using PPM

With your internet connection active, try using PPM again. Try to install a small package, like File-Slurp. You'll know that it still fails if you see an error stating that it can't find a ppd file for the specified package.

  1. Further Information and Help

If there were problems with any of the above hints, please see here on how to get further help.


AUTHOR AND COPYRIGHT

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

 ActivePerl FAQ