📄 module::build.3
字号:
.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.05).\".\" Standard preamble:.\" ========================================================================.de Sh \" Subsection heading.br.if t .Sp.ne 5.PP\fB\\$1\fR.PP...de Sp \" Vertical space (when we can't use .PP).if t .sp .5v.if n .sp...de Vb \" Begin verbatim text.ft CW.nf.ne \\$1...de Ve \" End verbatim text.ft R.fi...\" Set up some character translations and predefined strings. \*(-- will.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left.\" double quote, and \*(R" will give a right double quote. \*(C+ will.\" give a nicer C++. Capital omega is used to do unbreakable dashes and.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,.\" nothing in troff, for use with C<>..tr \(*W-.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'.ie n \{\. ds -- \(*W-. ds PI pi. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch. ds L" "". ds R" "". ds C` "". ds C' ""'br\}.el\{\. ds -- \|\(em\|. ds PI \(*p. ds L" ``. ds R" '''br\}.\".\" Escape single quotes in literal strings from groff's Unicode transform..ie \n(.g .ds Aq \(aq.el .ds Aq '.\".\" If the F register is turned on, we'll generate index entries on stderr for.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index.\" entries marked with X<> in POD. Of course, you'll have to process the.\" output yourself in some meaningful fashion..ie \nF \{\. de IX. tm Index:\\$1\t\\n%\t"\\$2"... nr % 0. rr F.\}.el \{\. de IX...\}.\".\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2)..\" Fear. Run. Save yourself. No user-serviceable parts.. \" fudge factors for nroff and troff.if n \{\. ds #H 0. ds #V .8m. ds #F .3m. ds #[ \f1. ds #] \fP.\}.if t \{\. ds #H ((1u-(\\\\n(.fu%2u))*.13m). ds #V .6m. ds #F 0. ds #[ \&. ds #] \&.\}. \" simple accents for nroff and troff.if n \{\. ds ' \&. ds ` \&. ds ^ \&. ds , \&. ds ~ ~. ds /.\}.if t \{\. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u". ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'.\}. \" troff and (daisy-wheel) nroff accents.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'.ds 8 \h'\*(#H'\(*b\h'-\*(#H'.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#].ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#].ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#].ds ae a\h'-(\w'a'u*4/10)'e.ds Ae A\h'-(\w'A'u*4/10)'E. \" corrections for vroff.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'. \" for low resolution devices (crt and lpr).if \n(.H>23 .if \n(.V>19 \\{\. ds : e. ds 8 ss. ds o a. ds d- d\h'-1'\(ga. ds D- D\h'-1'\(hy. ds th \o'bp'. ds Th \o'LP'. ds ae ae. ds Ae AE.\}.rm #[ #] #H #V #F C.\" ========================================================================.\".IX Title "Module::Build 3".TH Module::Build 3 "2007-12-18" "perl v5.10.0" "Perl Programmers Reference Guide".\" For nroff, turn off justification. Always turn off hyphenation; it makes.\" way too many mistakes in technical documents..if n .ad l.nh.SH "NAME"Module::Build \- Build and install Perl modules.SH "SYNOPSIS".IX Header "SYNOPSIS"Standard process for building & installing modules:.PP.Vb 4\& perl Build.PL\& ./Build\& ./Build test\& ./Build install.Ve.PPOr, if you're on a platform (like \s-1DOS\s0 or Windows) that doesn't requirethe \*(L"./\*(R" notation, you can do this:.PP.Vb 4\& perl Build.PL\& Build\& Build test\& Build install.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"\&\f(CW\*(C`Module::Build\*(C'\fR is a system for building, testing, and installingPerl modules. It is meant to be an alternative to\&\f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR. Developers may alter the behavior of themodule through subclassing in a much more straightforward way thanwith \f(CW\*(C`MakeMaker\*(C'\fR. It also does not require a \f(CW\*(C`make\*(C'\fR on your system\&\- most of the \f(CW\*(C`Module::Build\*(C'\fR code is pure-perl and written in a verycross-platform way. In fact, you don't even need a shell, so evenplatforms like MacOS (traditional) can use it fairly easily. Its onlyprerequisites are modules that are included with perl 5.6.0, and itworks fine on perl 5.005 if you can install a few additional modules..PPSee \*(L"\s-1MOTIVATIONS\s0\*(R" for more comparisons between \f(CW\*(C`ExtUtils::MakeMaker\*(C'\fRand \f(CW\*(C`Module::Build\*(C'\fR..PPTo install \f(CW\*(C`Module::Build\*(C'\fR, and any other module that uses\&\f(CW\*(C`Module::Build\*(C'\fR for its installation process, do the following:.PP.Vb 4\& perl Build.PL # \*(AqBuild.PL\*(Aq script creates the \*(AqBuild\*(Aq script\& ./Build # Need ./ to ensure we\*(Aqre using this "Build" script\& ./Build test # and not another one that happens to be in the PATH\& ./Build install.Ve.PPThis illustrates initial configuration and the running of three\&'actions'. In this case the actions run are 'build' (the defaultaction), 'test', and 'install'. Other actions defined so far include:.PP.Vb 10\& build manifest \& clean manpages \& code pardist \& config_data ppd \& diff ppmdist \& dist prereq_report\& distcheck pure_install\& distclean realclean \& distdir retest \& distmeta skipcheck \& distsign test \& disttest testall \& docs testcover \& fakeinstall testdb \& help testpod \& html testpodcoverage\& install versioninstall.Ve.PPYou can run the 'help' action for a complete list of actions..SH "GUIDE TO DOCUMENTATION".IX Header "GUIDE TO DOCUMENTATION"The documentation for \f(CW\*(C`Module::Build\*(C'\fR is broken up into three sections:.IP "General Usage (Module::Build)" 4.IX Item "General Usage (Module::Build)"This is the document you are currently reading. It describes basicusage and background information. Its main purpose is to assist theuser who wants to learn how to invoke and control \f(CW\*(C`Module::Build\*(C'\fRscripts at the command line..IP "Authoring Reference (Module::Build::Authoring)" 4.IX Item "Authoring Reference (Module::Build::Authoring)"This document describes the structure and organization of\&\f(CW\*(C`Module::Build\*(C'\fR, and the relevant concepts needed by authors who arewriting \fIBuild.PL\fR scripts for a distribution or controlling\&\f(CW\*(C`Module::Build\*(C'\fR processes programmatically..IP "\s-1API\s0 Reference (Module::Build::API)" 4.IX Item "API Reference (Module::Build::API)"This is a reference to the \f(CW\*(C`Module::Build\*(C'\fR \s-1API\s0..IP "Cookbook (Module::Build::Cookbook)" 4.IX Item "Cookbook (Module::Build::Cookbook)"This document demonstrates how to accomplish many common tasks. Itcovers general command line usage and authoring of \fIBuild.PL\fRscripts. Includes working examples..SH "ACTIONS".IX Header "ACTIONS"There are some general principles at work here. First, each task whenbuilding a module is called an \*(L"action\*(R". These actions are listedabove; they correspond to the building, testing, installing,packaging, etc., tasks..PPSecond, arguments are processed in a very systematic way. Argumentsare always key=value pairs. They may be specified at \f(CW\*(C`perl Build.PL\*(C'\fRtime (i.e. \f(CW\*(C`perl Build.PL destdir=/my/secret/place\*(C'\fR), in which casetheir values last for the lifetime of the \f(CW\*(C`Build\*(C'\fR script. They mayalso be specified when executing a particular action (i.e.\&\f(CW\*(C`Build test verbose=1\*(C'\fR), in which case their values last only for thelifetime of that command. Per-action command line parameters takeprecedence over parameters specified at \f(CW\*(C`perl Build.PL\*(C'\fR time..PPThe build process also relies heavily on the \f(CW\*(C`Config.pm\*(C'\fR module.If the user wishes to override any of thevalues in \f(CW\*(C`Config.pm\*(C'\fR, she may specify them like so:.PP.Vb 1\& perl Build.PL \-\-config cc=gcc \-\-config ld=gcc.Ve.PPThe following build actions are provided by default..IP "build" 4.IX Item "build"[version 0.01].SpIf you run the \f(CW\*(C`Build\*(C'\fR script without any arguments, it runs the\&\f(CW\*(C`build\*(C'\fR action, which in turn runs the \f(CW\*(C`code\*(C'\fR and \f(CW\*(C`docs\*(C'\fR actions..SpThis is analogous to the MakeMaker 'make all' target..IP "clean" 4.IX Item "clean"[version 0.01].SpThis action will clean up any files that the build process may havecreated, including the \f(CW\*(C`blib/\*(C'\fR directory (but not including the\&\f(CW\*(C`_build/\*(C'\fR directory and the \f(CW\*(C`Build\*(C'\fR script itself)..IP "code" 4.IX Item "code"[version 0.20].SpThis action builds your codebase..SpBy default it just creates a \f(CW\*(C`blib/\*(C'\fR directory and copies any \f(CW\*(C`.pm\*(C'\fRand \f(CW\*(C`.pod\*(C'\fR files from your \f(CW\*(C`lib/\*(C'\fR directory into the \f(CW\*(C`blib/\*(C'\fRdirectory. It also compiles any \f(CW\*(C`.xs\*(C'\fR files from \f(CW\*(C`lib/\*(C'\fR and placesthem in \f(CW\*(C`blib/\*(C'\fR. Of course, you need a working C compiler (probablythe same one that built perl itself) for the compilation to workproperly..SpThe \f(CW\*(C`code\*(C'\fR action also runs any \f(CW\*(C`.PL\*(C'\fR files in your \fIlib/\fRdirectory. Typically these create other files, named the same butwithout the \f(CW\*(C`.PL\*(C'\fR ending. For example, a file \fIlib/Foo/Bar.pm.PL\fRcould create the file \fIlib/Foo/Bar.pm\fR. The \f(CW\*(C`.PL\*(C'\fR files areprocessed first, so any \f(CW\*(C`.pm\*(C'\fR files (or other kinds that we dealwith) will get copied correctly..IP "config_data" 4.IX Item "config_data"[version 0.26].Sp\&....IP "diff" 4.IX Item "diff"[version 0.14].SpThis action will compare the files about to be installed with theirinstalled counterparts. For .pm and .pod files, a diff will be shown(this currently requires a 'diff' program to be in your \s-1PATH\s0). Forother files like compiled binary files, we simply report whether theydiffer..SpA \f(CW\*(C`flags\*(C'\fR parameter may be passed to the action, which will be passedto the 'diff' program. Consult your 'diff' documentation for theparameters it will accept \- a good one is \f(CW\*(C`\-u\*(C'\fR:.Sp.Vb 1\& ./Build diff flags=\-u.Ve.IP "dist" 4.IX Item "dist"[version 0.02].SpThis action is helpful for module authors who want to package up theirmodule for source distribution through a medium like \s-1CPAN\s0. It will create atarball of the files listed in \fI\s-1MANIFEST\s0\fR and compress the tarball using\&\s-1GZIP\s0 compression..SpBy default, this action will use the external \f(CW\*(C`tar\*(C'\fR and \f(CW\*(C`gzip\*(C'\fRexecutables on Unix-like platforms, and the \f(CW\*(C`Archive::Tar\*(C'\fR moduleelsewhere. However, you can force it to use whatever executable youwant by supplying an explicit \f(CW\*(C`tar\*(C'\fR (and optional \f(CW\*(C`gzip\*(C'\fR) parameter:.Sp.Vb 1\& ./Build dist \-\-tar C:\epath\eto\etar.exe \-\-gzip C:\epath\eto\ezip.exe.Ve.IP "distcheck" 4.IX Item "distcheck"[version 0.05].SpReports which files are in the build directory but not in the\&\fI\s-1MANIFEST\s0\fR file, and vice versa. (See manifest for details.).IP "distclean" 4.IX Item "distclean"[version 0.05].SpPerforms the 'realclean' action and then the 'distcheck' action..IP "distdir" 4.IX Item "distdir"[version 0.05].Sp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -