home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_c4e4dfa078bfc8424bb71dde36633eae
< prev
next >
Wrap
Text File
|
2000-03-22
|
15KB
|
337 lines
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<TITLE>perlwin32faq11 - Using PPM to install modules</TITLE>
<LINK rev="made" href="mailto:support@ActiveState.com">
<META name="GENERATOR" charset="iso-8859-1" content="Microsoft FrontPage 4.0">
<META name="ProgId" content="FrontPage.Editor.Document">
<LINK rel="STYLESHEET" href="../Active.css" type="text/css" media="screen">
</HEAD>
<BODY bgcolor="#ffffff">
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD class="block" valign="MIDDLE" width="100%" bgcolor="#cccccc"><STRONG>
<P class="block"> ActivePerl FAQ</P>
</STRONG></TD>
</TR>
</TABLE>
<UL>
<LI><A href="#NAME">NAME</A></LI>
<LI><A href="#DESCRIPTION">DESCRIPTION</A>
<UL>
<LI><A href="#what_is_ppm">What is the Perl Package Manager (PPM)?</A></LI>
<LI><A href="#how_do_i_install_ppm">How do I install PPM?</A></LI>
<LI><A href="#running_ppm">How do I run PPM?</A></LI>
<LI><A href="#using_ppm">How do I use PPM?</A></LI>
<LI><A href="#repositories">Where are the package repositories?</A></LI>
<LI><A href="#how_to_make_ppm_distribution">How do I make a PPM package?</A></LI>
<LI><A href="#ppm_and_proxies">PPM, Proxies and Firewalls</A></LI>
</UL>
</LI>
<LI><A href="#AUTHOR_AND_COPYRIGHT">AUTHOR AND COPYRIGHT</A></LI>
</UL>
<HR>
<H1><A name="NAME">NAME</A></H1>
<P>ActivePerl-faq2 - Using PPM to install modules</P>
<HR>
<H1><A name="DESCRIPTION">DESCRIPTION</A></H1>
<P>How to install and upgrade modules for ActivePerl using PPM</P>
<A name="what_is_ppm"></A>
<HR>
<H1>What is the Perl Package Manager (PPM)?</H1>
<P>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.</P>
<A name="how_do_i_install_ppm"></A>
<HR>
<H1>How do I install PPM?</H1>
<P>PPM is installed when you install ActivePerl.</P>
<A name="running_ppm"></A>
<HR>
<H1>How do I run PPM?</H1>
<P>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 <A href="#ppm_and_proxies">PPM, Proxies and
Firewalls</A> for more information.</P>
<P>PPM can then be run by typing 'ppm' in a command prompt window.</P>
<A name="using_ppm"></A>
<HR>
<H1>How do I use PPM?</H1>
<P>Quick start: at the PPM command prompt, type '<CODE>search</CODE>' to get a listing of all
available packages, then type '<CODE>install <packagename></CODE>', where <CODE><packagename></CODE>
is the name of a package displayed by the '<CODE>search</CODE>' command. To list the packages you
have previously installed using PPM, use the '<CODE>query</CODE>' command.</P>
<P>If you find the listing of packages scrolls by too quickly, you may want to use the command '<CODE>set
more <number></CODE>' to pause the listing after <number> packages have been displayed.
Use the '<CODE>set save</CODE>' command to save this configuration for future PPM sessions.</P>
<P>By default, PPM will use the ActiveState package repository, but this too can be configured using
the '<CODE>set</CODE>' command. See below in <A href="#repositories">Where are the package
repositories?</A>.</P>
<P>Below is a listing of key PPM commands (you can type '<CODE>help <command></CODE>' at the
PPM prompt for usage details for a particular <command>). Items in [brackets] are optional.</P>
<TABLE cellpadding="5">
<TR>
<TD bgcolor="#454545"><FONT color="#FFFFFF"><B>Command</B></FONT></TD>
<TD bgcolor="#454545"><FONT color="#FFFFFF"><B>Function</B></FONT></TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>genconfig</B></TD>
<TD bgcolor="#E5E4F0">prints a minimal PPM configuration file to STDOUT [Note: genconfig only
works from the command-line]</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>help [command]</B></TD>
<TD bgcolor="#E5E4F0">lists available commands, or help on 'command'.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>info [package1...]</B></TD>
<TD bgcolor="#E5E4F0">prints a summary of installed packages.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>install package1 [package2...]</B></TD>
<TD bgcolor="#E5E4F0">installs specified packages.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>quit</B></TD>
<TD bgcolor="#E5E4F0">exits the program.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>query [pattern]</B></TD>
<TD bgcolor="#E5E4F0">lists installed packages, or packages containing <CODE>pattern</CODE>.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>query /abstract [pattern]</B></TD>
<TD bgcolor="#E5E4F0">lists descriptions of installed packages, or package descriptions
containing <CODE>pattern</CODE>.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>remove package1 [package2...]</B></TD>
<TD bgcolor="#E5E4F0">removes the specified packages from the system.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>search [pattern]</B></TD>
<TD bgcolor="#E5E4F0">lists available packages, or packages containing <CODE>pattern</CODE>.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>search /abstract [pattern]</B></TD>
<TD bgcolor="#E5E4F0">lists descriptions of available packages, or package descriptions
containing <CODE>pattern</CODE>.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>set</B></TD>
<TD bgcolor="#E5E4F0">set/display current options.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>set save</B></TD>
<TD bgcolor="#E5E4F0">save current options.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>verify [package1...]</B></TD>
<TD bgcolor="#E5E4F0">verifies currently installed packages are up to date.</TD>
</TR>
<TR>
<TD bgcolor="#D4F4A0"><B>verify /upgrade [package1...]</B></TD>
<TD bgcolor="#E5E4F0">installs available package upgrades.</TD>
</TR>
</TABLE>
<P>A pattern is a search string just like the regular expressions - for example if you search for
with this command</P>
<BLOCKQUOTE>
<P>search ODBC|DBI</P>
</BLOCKQUOTE>
<P>(which means <I>'search for packages in which the characters ODBC and/or the characters DBI are
present in that order'</I>) you get a result like this</P>
<BLOCKQUOTE>
<P>Apache-DBI<BR>
DBD-ODBC<BR>
DBI<BR>
FindBin<BR>
Win32-ODBC</P>
</BLOCKQUOTE>
<P>Note that if you use 'search /abstract [pattern]' the search will only include the ABSTRACT
section of the package files.</P>
<A name="repositories"></A>
<HR>
<H1>Where are the package repositories?</H1>
<P>By default, PPM will use the ActiveState package repository, but there are other repositories on
the Internet. At the moment there are these repositories:</P>
<BLOCKQUOTE>
<TABLE border="0" cellspacing="10">
<TR>
<TD valign="top" align="left" width="50%"><A href="http://www.ActiveState.com/packages/">http://www.ActiveState.com/packages</A></TD>
<TD valign="top" align="left" width="50%">The default package repository from ActiveState</TD>
</TR>
<TR>
<TD valign="top" align="left" width="50%"><A href="http://Jenda.Krynicky.cz/perl/">http://Jenda.Krynicky.cz/perl</A></TD>
<TD valign="top" align="left" width="50%">Jan Krynicky's package repository</TD>
</TR>
<TR>
<TD valign="top" align="left" width="50%"><A href="http://www.roth.net/perl/packages/">http://www.roth.net/perl/packages/</A></TD>
<TD valign="top" align="left" width="50%">Roth Consulting's package repository</TD>
</TR>
<TR>
<TD valign="top" align="left" width="50%"><A href="http://www.xray.mpe.mpg.de/~ach/ptk/ppm">http://www.xray.mpe.mpg.de/~ach/ptk/ppm</A></TD>
<TD valign="top" align="left" width="50%">Achim Bohnet's package repository</TD>
</TR>
<TR>
<TD valign="top" align="left" width="50%"><A href="http://rto.dk/packages/">http://rto.dk/packages/</A></TD>
<TD valign="top" align="left" width="50%">RTO's packages repository (mostly mirrors of the
above)</TD>
</TR>
<TR>
<TD colspan="2">
<HR width="50%">
</TD>
</TR>
<TR>
<TD valign="top" align="left" width="50%"><A href="http://www.fastnetltd.ndirect.co.uk/Perl/zips/">http://www.fastnetltd.ndirect.co.uk/Perl/zips/</A></TD>
<TD valign="top" align="left" width="50%">Fastnet Software Ltd's packages - not directly
accessible from PPM at present</TD>
</TR>
</TABLE>
</BLOCKQUOTE>
<P>To use these package repositories you start PPM and at the prompt type</P>
<BLOCKQUOTE>
<P>set repository <I>NAME</I> <I>URL</I></P>
</BLOCKQUOTE>
<P>where <I>NAME</I> is a name by which you want to reference the repository from PPM and <I>URL</I>
is the URL to the repository. You could for example type</P>
<BLOCKQUOTE>
<P>set repository JENDA http://Jenda.Krynicky.cz/perl</P>
</BLOCKQUOTE>
<P>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'.</P>
<A name="how_to_make_ppm_distribution"></A>
<HR>
<H1>How do I make a PPM package?</H1>
<P>If you want to make a PPM package for use on other machine you can do it like this:</P>
<P>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:</P>
<BLOCKQUOTE>
<P><CODE>use ExtUtils::MakeMaker;<BR>
# See lib/ExtUtils/MakeMaker.pm for details of how to influence<BR>
# the contents of the Makefile that is written.<BR>
WriteMakefile(<BR>
'NAME' => 'Term::Control',<BR>
'VERSION_FROM' => 'Control.pm', # finds $VERSION<BR>
($] ge '5.005') ? (<BR>
'AUTHOR' => 'Johnny Doel (johnny@doel.org)',<BR>
'ABSTRACT' => 'Control the IO for terminals',<BR>
) : (),<BR>
);</CODE></P>
</BLOCKQUOTE>
<P>Then you make the archive with the commands</P>
<BLOCKQUOTE>
<P><CODE>perl Makefile.PL<BR>
nmake</CODE></P>
</BLOCKQUOTE>
<P>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:</P>
<BLOCKQUOTE>
<P><CODE>tar cvf <I>package</I>.tar blib<BR>
gzip --best <I>package</I>.tar</CODE></P>
</BLOCKQUOTE>
<P>You now have an archive called <I>package</I>.tar.gz. Then you generate the PPD file by:</P>
<BLOCKQUOTE>
<P><CODE>nmake ppd</CODE></P>
</BLOCKQUOTE>
<P>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.</P>
<P>You can get nmake from <A href="ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe">ftp://ftp.microsoft.com/Softlib/MSLFILES/nmake15.exe</A>.
You can get tar and gzip from <A href="http://www.itribe.net/virtunix/">http://www.itribe.net/virtunix/</A>.</P>
<HR>
<A name="ppm_and_proxies"></A>
<H1>PPM, Proxies and Firewalls</H1>
<P>If you use a proxy server or firewall, you might have trouble running PPM. Here is the solution.</P>
<BLOCKQUOTE>
<P><B><I>NOTE</I></B>: If none of the changes in this document work for you, you may download
individual packages from <A href="http://www.activestate.com/packages/zips">here</A> 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 <I>x86</I> directory beneath that.</P>
</BLOCKQUOTE>
<OL start="1">
<LI>
<P><B>Set Environment Vars</B></P>
</LI>
</OL>
<BLOCKQUOTE>
<P>Up to three environment variables need to be set.</P>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><STRONG>Under Windows NT<BR>
</STRONG>Right click on "My Computer", click on "properties", select the
"environment" tab. These are your environment settings. Make the following changes:<BR>
<BR>
</P>
<OL>
<LI>Add the setting HTTP_proxy, with your proxy name as the value (<EM><STRONG>you must include
"http://"</STRONG></EM> ), followed by a colon and the proxy port, if applicable;
e.g., "http://proxy:8080"</LI>
<LI>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</LI>
<LI style="list-style: none"><BR>
</LI>
</OL>
</BLOCKQUOTE>
<BLOCKQUOTE>
<P><STRONG>Under Windows 95<BR>
</STRONG>In your AUTOEXEC.BAT file, place the following lines then reboot so the changes can take
effect:</P>
</BLOCKQUOTE>
<BLOCKQUOTE>
<OL start="1">
<LI>SET HTTP_proxy=<your proxy server (<STRONG><EM>you must include "http://"</EM></STRONG>
>, followed by a colon and the proxy port, if applicable; e.g., SET HTTP_proxy=http://proxy:8080</LI>
<LI>SET HTTP_proxy_user=<your user name> (if required)</LI>
<LI>SET HTTP_proxy_pass=<your password> (if required)<BR>
<BR>
</LI>
</OL>
</BLOCKQUOTE>
<OL start="2">
<LI>
<P><B>Try using PPM</B></P>
</LI>
</OL>
<BLOCKQUOTE>
<P>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.</P>
</BLOCKQUOTE>
<OL start="3">
<LI>
<P><B>Further Information and Help</B></P>
</LI>
</OL>
<BLOCKQUOTE>
<P>If there were problems with any of the above hints, please see <A href="../readme.html#More_Info">here</A>
on how to get further help.</P>
</BLOCKQUOTE>
<HR>
<H1><A name="AUTHOR_AND_COPYRIGHT">AUTHOR AND COPYRIGHT</A></H1>
<P>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.</P>
<P>This FAQ is in the public domain. If you use it, however, please ensure that you give credit to
the original authors.</P>
<TABLE border="0" cellpadding="0" cellspacing="0" width="100%">
<TR>
<TD class="block" valign="MIDDLE" width="100%" bgcolor="#cccccc"><STRONG>
<P class="block"> ActivePerl FAQ</P>
</STRONG></TD>
</TR>
</TABLE>
</BODY>
</HTML>