📄 cpanplus::dist::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 "CPANPLUS::Dist::Build 3".TH CPANPLUS::Dist::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"CPANPLUS::Dist::Build.SH "SYNOPSIS".IX Header "SYNOPSIS".Vb 4\& my $build = CPANPLUS::Dist\->new(\& format => \*(AqCPANPLUS::Dist::Build\*(Aq,\& module => $modobj,\& );\& \& $build\->prepare; # runs Module::Build\->new_from_context; \& $build\->create; # runs build && build test\& $build\->install; # runs build install.Ve.SH "DESCRIPTION".IX Header "DESCRIPTION"\&\f(CW\*(C`CPANPLUS::Dist::Build\*(C'\fR is a distribution class for \f(CW\*(C`Module::Build\*(C'\fRrelated modules.Using this package, you can create, install and uninstall perlmodules. It inherits from \f(CW\*(C`CPANPLUS::Dist\*(C'\fR..PPNormal users won't have to worry about the interface to this module,as it functions transparently as a plug-in to \f(CW\*(C`CPANPLUS\*(C'\fR and will just \f(CW\*(C`Do The Right Thing\*(C'\fR when it's loaded..SH "ACCESSORS".IX Header "ACCESSORS".IP "\fIparent()\fR" 4.IX Item "parent()"Returns the \f(CW\*(C`CPANPLUS::Module\*(C'\fR object that parented this object..IP "\fIstatus()\fR" 4.IX Item "status()"Returns the \f(CW\*(C`Object::Accessor\*(C'\fR object that keeps the status forthis module..SH "STATUS ACCESSORS".IX Header "STATUS ACCESSORS"All accessors can be accessed as follows: \f(CW$build\fR\->status\->\s-1ACCESSOR\s0.IP "build_pl ()" 4.IX Item "build_pl ()"Location of the Build file.Set to 0 explicitly if something went wrong..IP "build ()" 4.IX Item "build ()"\&\s-1BOOL\s0 indicating if the \f(CW\*(C`Build\*(C'\fR command was successful..IP "test ()" 4.IX Item "test ()"\&\s-1BOOL\s0 indicating if the \f(CW\*(C`Build test\*(C'\fR command was successful..IP "prepared ()" 4.IX Item "prepared ()"\&\s-1BOOL\s0 indicating if the \f(CW\*(C`prepare\*(C'\fR call exited succesfullyThis gets set after \f(CW\*(C`perl Build.PL\*(C'\fR.IP "distdir ()" 4.IX Item "distdir ()"Full path to the directory in which the \f(CW\*(C`prepare\*(C'\fR call took place,set after a call to \f(CW\*(C`prepare\*(C'\fR..IP "created ()" 4.IX Item "created ()"\&\s-1BOOL\s0 indicating if the \f(CW\*(C`create\*(C'\fR call exited succesfully. This getsset after \f(CW\*(C`Build\*(C'\fR and \f(CW\*(C`Build test\*(C'\fR..IP "installed ()" 4.IX Item "installed ()"\&\s-1BOOL\s0 indicating if the module was installed. This gets set after\&\f(CW\*(C`Build install\*(C'\fR exits successfully..IP "uninstalled ()" 4.IX Item "uninstalled ()"\&\s-1BOOL\s0 indicating if the module was uninstalled properly..IP "_create_args ()" 4.IX Item "_create_args ()"Storage of the arguments passed to \f(CW\*(C`create\*(C'\fR for this object. Usedfor recursive calls when satisfying prerequisites..IP "_install_args ()" 4.IX Item "_install_args ()"Storage of the arguments passed to \f(CW\*(C`install\*(C'\fR for this object. Usedfor recursive calls when satisfying prerequisites..IP "_mb_object ()" 4.IX Item "_mb_object ()"Storage of the \f(CW\*(C`Module::Build\*(C'\fR object we used for this installation..SH "METHODS".IX Header "METHODS".ie n .Sh "$bool\fP = CPANPLUS::Dist::Build\->\fIformat_available();".el .Sh "\f(CW$bool\fP = CPANPLUS::Dist::Build\->\fIformat_available()\fP;".IX Subsection "$bool = CPANPLUS::Dist::Build->format_available();"Returns a boolean indicating whether or not you can use this packageto create and install modules in your environment..ie n .Sh "$bool\fP = \f(CW$dist\fP\->\fIinit();".el .Sh "\f(CW$bool\fP = \f(CW$dist\fP\->\fIinit()\fP;".IX Subsection "$bool = $dist->init();"Sets up the \f(CW\*(C`CPANPLUS::Dist::Build\*(C'\fR object for use.Effectively creates all the needed status accessors..PPCalled automatically whenever you create a new \f(CW\*(C`CPANPLUS::Dist\*(C'\fR object..ie n .Sh "$bool\fP = \f(CW$dist\->prepare([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', force => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".el .Sh "\f(CW$bool\fP = \f(CW$dist\fP\->prepare([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', force => \s-1BOOL\s0, verbose => \s-1BOOL\s0])".IX Subsection "$bool = $dist->prepare([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', force => BOOL, verbose => BOOL])"\&\f(CW\*(C`prepare\*(C'\fR prepares a distribution, running \f(CW\*(C`Module::Build\*(C'\fR's \&\f(CW\*(C`new_from_context\*(C'\fR method, and establishing any prerequisites thisdistribution has..PPWhen running \f(CW\*(C`Module::Build\->new_from_context\*(C'\fR, the environment variable \f(CW\*(C`PERL5_CPANPLUS_IS_EXECUTING\*(C'\fR will be set to the full path of the \f(CW\*(C`Build.PL\*(C'\fR that is being executed. This enables any code insidethe \f(CW\*(C`Build.PL\*(C'\fR to know that it is being installed via \s-1CPANPLUS\s0..PPAfter a succcesfull \f(CW\*(C`prepare\*(C'\fR you may call \f(CW\*(C`create\*(C'\fR to create thedistribution, followed by \f(CW\*(C`install\*(C'\fR to actually install it..PPReturns true on success and false on failure..ie n .Sh "$dist\->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => \s-1TARGET\s0, force => \s-1BOOL\s0, verbose => \s-1BOOL\s0, skiptest => \s-1BOOL\s0])".el .Sh "\f(CW$dist\fP\->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => \s-1TARGET\s0, force => \s-1BOOL\s0, verbose => \s-1BOOL\s0, skiptest => \s-1BOOL\s0])".IX Subsection "$dist->create([perl => '/path/to/perl', buildflags => 'EXTRA=FLAGS', prereq_target => TARGET, force => BOOL, verbose => BOOL, skiptest => BOOL])"\&\f(CW\*(C`create\*(C'\fR preps a distribution for installation. This means it willrun \f(CW\*(C`Build\*(C'\fR and \f(CW\*(C`Build test\*(C'\fR, via the \f(CW\*(C`Module::Build\*(C'\fR \s-1API\s0.This will also satisfy any prerequisites the module may have..PPIf you set \f(CW\*(C`skiptest\*(C'\fR to true, it will skip the \f(CW\*(C`Build test\*(C'\fR stage.If you set \f(CW\*(C`force\*(C'\fR to true, it will go over all the stages of the\&\f(CW\*(C`Build\*(C'\fR process again, ignoring any previously cached results. Itwill also ignore a bad return value from \f(CW\*(C`Build test\*(C'\fR and still allowthe operation to return true..PPReturns true on success and false on failure..PPYou may then call \f(CW\*(C`$dist\->install\*(C'\fR on the object to actuallyinstall it..ie n .Sh "$dist\->install([verbose => \s-1BOOL\s0, perl => /path/to/perl])".el .Sh "\f(CW$dist\fP\->install([verbose => \s-1BOOL\s0, perl => /path/to/perl])".IX Subsection "$dist->install([verbose => BOOL, perl => /path/to/perl])"Actually installs the created dist..PPReturns true on success and false on failure..SH "KNOWN ISSUES".IX Header "KNOWN ISSUES"Below are some of the known issues with Module::Build, that we hope the authors will resolve at some point, so we can make full use ofModule::Build's power. The number listed is the bug number on \f(CW\*(C`rt.cpan.org\*(C'\fR..IP "\(bu" 4Module::Build can not be upgraded using its own \s-1API\s0 (#13169).SpThis is due to the fact that the Build file insists on adding a pathto \f(CW@INC\fR which force the loading of the \f(CW\*(C`not yet installed\*(C'\fRModule::Build when it shells out to run it's own build procedure:.IP "\(bu" 4Module::Build does not provide access to install history (#9793).Sp\&\f(CW\*(C`Module::Build\*(C'\fR runs the create, test and install procedures in it'sown processes, but does not provide access to any diagnostic messages ofthose processes. As an end result, we can not offer these diagnostic messages when, for example, reporting automated build failures to siteslike \f(CW\*(C`testers.cpan.org\*(C'\fR..SH "AUTHOR".IX Header "AUTHOR"Originally by Jos Boumans <kane@cpan.org>. Brought to workingcondition and currently maintained by Ken Williams <kwilliams@cpan.org>..SH "COPYRIGHT".IX Header "COPYRIGHT"The \s-1CPAN++\s0 interface (of which this module is a part of) iscopyright (c) 2001, 2002, 2003, 2004, 2005 Jos Boumans <kane@cpan.org>.All rights reserved..PPThis library is free software;you may redistribute and/or modify it under the sameterms as Perl itself.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -