没有合适的资源?快使用搜索试试~ 我知道了~
首页Perl Programmer's Reference Guide.pdf
资源详情
资源评论
资源推荐

Perl Programmers Reference Guide
Version 5.005_02
18−Oct−1998
"There’s more than one way to do it."
−− Larry Wall, Author of the Perl Programming Language
Author: Perl5−Porters

blank

INSTALL Perl Programmers Reference Guide INSTALL
NAME
Install − Build and Installation guide for perl5.
SYNOPSIS
The basic steps to build and install perl5 on a Unix system are:
rm −f config.sh Policy.sh
sh Configure
make
make test
make install
# You may also wish to add these:
(cd /usr/include && h2ph *.h sys/*.h)
(installhtml −−help)
(cd pod && make tex && <process the latex files>)
Each of these is explained in further detail below.
For information on non−Unix systems, see the section on "Porting information" below.
For information on what‘s new in this release, see the pod/perldelta.pod file. For more detailed information
about specific changes, see the Changes file.
DESCRIPTION
This document is written in pod format as an easy way to indicate its structure. The pod format is described
in pod/perlpod.pod, but you can read it as is with any pager or editor. Headings and items are marked by
lines beginning with ‘=’. The other mark−up used is
B<text> embolden text, used for switches, programs or commands
C<code> literal code
L<name> A link (cross reference) to name
You should probably at least skim through this entire document before proceeding.
If you‘re building Perl on a non−Unix system, you should also read the README file specific to your
operating system, since this may provide additional or different instructions for building Perl.
If there is a hint file for your system (in the hints/ directory) you should also read that hint file for specific
information for your system. (Unixware users should use the svr4.sh hint file.)
WARNING: This version is not binary compatible with Perl 5.004.
Starting with Perl 5.004_50 there were many deep and far−reaching changes to the language internals. If
you have dynamically loaded extensions that you built under perl 5.003 or 5.004, you can continue to use
them with 5.004, but you will need to rebuild and reinstall those extensions to use them 5.005. See the
discussions below on "Coexistence with earlier versions of perl5" and "Upgrading from 5.004 to 5.005" for
more details.
The standard extensions supplied with Perl will be handled automatically.
In a related issue, old extensions may possibly be affected by the changes in the Perl language in the current
release. Please see pod/perldelta.pod for a description of what‘s changed.
Space Requirements
The complete perl5 source tree takes up about 10 MB of disk space. The complete tree after completing
make takes roughly 20 MB, though the actual total is likely to be quite system−dependent. The installation
directories need something on the order of 10 MB, though again that value is system−dependent.
18−Oct−1998 Version 5.005_02 3

INSTALL Perl Programmers Reference Guide INSTALL
Start with a Fresh Distribution
If you have built perl before, you should clean out the build directory with the command
make distclean
or
make realclean
The only difference between the two is that make distclean also removes your old config.sh and Policy.sh
files.
The results of a Configure run are stored in the config.sh and Policy.sh files. If you are upgrading from a
previous version of perl, or if you change systems or compilers or make other significant changes, or if you
are experiencing difficulties building perl, you should probably not re−use your old config.sh. Simply
remove it or rename it, e.g.
mv config.sh config.sh.old
If you wish to use your old config.sh, be especially attentive to the version and architecture−specific
questions and answers. For example, the default directory for architecture−dependent library modules
includes the version name. By default, Configure will reuse your old name (e.g.
/opt/perl/lib/i86pc−solaris/5.003) even if you‘re running Configure for a different version, e.g. 5.004. Yes,
Configure should probably check and correct for this, but it doesn‘t, presently. Similarly, if you used a
shared libperl.so (see below) with version numbers, you will probably want to adjust them as well.
Also, be careful to check your architecture name. Some Linux systems (such as Debian) use i386, while
others may use i486, i586, or i686. If you pick up a precompiled binary, it might not use the same name.
In short, if you wish to use your old config.sh, I recommend running Configure interactively rather than
blindly accepting the defaults.
If your reason to reuse your old config.sh is to save your particular installation choices, then you can
probably achieve the same effect by using the new Policy.sh file. See the section on
"Site−wide Policy settings" below.
Run Configure
Configure will figure out various things about your system. Some things Configure will figure out for itself,
other things it will ask you about. To accept the default, just press RETURN. The default is almost always
okay. At any Configure prompt, you can type &−d and Configure will use the defaults from then on.
After it runs, Configure will perform variable substitution on all the *.SH files and offer to run make depend.
Configure supports a number of useful options. Run Configure −h to get a listing. See the Porting/Glossary
file for a complete list of Configure variables you can set and their definitions.
To compile with gcc, for example, you should run
sh Configure −Dcc=gcc
This is the preferred way to specify gcc (or another alternative compiler) so that the hints files can set
appropriate defaults.
If you want to use your old config.sh but override some of the items with command line options, you need to
use Configure −O.
By default, for most systems, perl will be installed in /usr/local/{bin, lib, man}. You can specify a different
‘prefix’ for the default installation directory, when Configure prompts you or by using the Configure
command line option −Dprefix=‘/some/directory‘, e.g.
sh Configure −Dprefix=/opt/perl
4 Version 5.005_02 18−Oct−1998

INSTALL Perl Programmers Reference Guide INSTALL
If your prefix contains the string "perl", then the directories are simplified. For example, if you use
prefix=/opt/perl, then Configure will suggest /opt/perl/lib instead of /opt/perl/lib/perl5/.
NOTE: You must not specify an installation directory that is below your perl source directory. If you do,
installperl will attempt infinite recursion.
It may seem obvious to say, but Perl is useful only when users can easily find it. It‘s often a good idea to
have both /usr/bin/perl and /usr/local/bin/perl be symlinks to the actual binary. Be especially careful,
however, of overwriting a version of perl supplied by your vendor. In any case, system administrators are
strongly encouraged to put (symlinks to) perl and its accompanying utilities, such as perldoc, into a directory
typically found along a user‘s PATH, or in another obvious and convenient place.
By default, Configure will compile perl to use dynamic loading if your system supports it. If you want to
force perl to be compiled statically, you can either choose this when Configure prompts you or you can use
the Configure command line option −Uusedl.
If you are willing to accept all the defaults, and you want terse output, you can run
sh Configure −des
For my Solaris system, I usually use
sh Configure −Dprefix=/opt/perl −Doptimize=’−xpentium −xO4’ −des
GNU−style configure
If you prefer the GNU−style configure command line interface, you can use the supplied configure.gnu
command, e.g.
CC=gcc ./configure.gnu
The configure.gnu script emulates a few of the more common configure options. Try
./configure.gnu −−help
for a listing.
Cross compiling is not supported.
(The file is called configure.gnu to avoid problems on systems that would not distinguish the files
"Configure" and "configure".)
Extensions
By default, Configure will offer to build every extension which appears to be supported. For example,
Configure will offer to build GDBM_File only if it is able to find the gdbm library. (See examples below.)
B, DynaLoader, Fcntl, IO, and attrs are always built by default. Configure does not contain code to test for
POSIX compliance, so POSIX is always built by default as well. If you wish to skip POSIX, you can set the
Configure variable useposix=false either in a hint file or from the Configure command line. Similarly, the
Opcode extension is always built by default, but you can skip it by setting the Configure variable
useopcode=false either in a hint file for from the command line.
You can learn more about each of these extensions by consulting the documentation in the individual .pm
modules, located under the ext/ subdirectory.
Even if you do not have dynamic loading, you must still build the DynaLoader extension; you should just
build the stub dl_none.xs version. (Configure will suggest this as the default.)
In summary, here are the Configure command−line variables you can set to turn off each extension:
B (Always included by default)
DB_File i_db
DynaLoader (Must always be included as a static extension)
Fcntl (Always included by default)
GDBM_File i_gdbm
IO (Always included by default)
18−Oct−1998 Version 5.005_02 5
剩余1462页未读,继续阅读











安全验证
文档复制为VIP权益,开通VIP直接复制

评论1