⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 module::build.3

📁 视频监控网络部分的协议ddns,的模块的实现代码,请大家大胆指正.
💻 3
📖 第 1 页 / 共 3 页
字号:
.Sh "Command Line Options".IX Subsection "Command Line Options"The following options can be used during any invocation of \f(CW\*(C`Build.PL\*(C'\fRor the Build script, during any action.  For information on otheroptions specific to an action, see the documentation for therespective action..PP\&\s-1NOTE:\s0 There is some preliminary support for options to use the morefamiliar long option style.  Most options can be preceded with the\&\f(CW\*(C`\-\-\*(C'\fR long option prefix, and the underscores changed to dashes(e.g. \-\-use\-rcfile).  Additionally, the argument to boolean options isoptional, and boolean options can be negated by prefixing them with\&'no' or 'no\-' (e.g. \-\-noverbose or \-\-no\-verbose)..IP "quiet" 4.IX Item "quiet"Suppress informative messages on output..IP "use_rcfile" 4.IX Item "use_rcfile"Load the \fI~/.modulebuildrc\fR option file.  This option can be set tofalse to prevent the custom resource file from being loaded..IP "verbose" 4.IX Item "verbose"Display extra information about the Build on output..IP "allow_mb_mismatch" 4.IX Item "allow_mb_mismatch"Suppresses the check upon startup that the version of Module::Buildwe're now running under is the same version that was initially invokedwhen building the distribution (i.e. when the \f(CW\*(C`Build.PL\*(C'\fR script wasfirst run).  Use with caution..Sh "Default Options File (\fI.modulebuildrc\fP)".IX Subsection "Default Options File (.modulebuildrc)"[version 0.28].PPWhen Module::Build starts up, it will look first for a file,\&\fI\f(CI$ENV\fI{\s-1HOME\s0}/.modulebuildrc\fR.  If it's not found there, it will lookin the the \fI.modulebuildrc\fR file in the directories referred to bythe environment variables \f(CW\*(C`HOMEDRIVE\*(C'\fR + \f(CW\*(C`HOMEDIR\*(C'\fR, \f(CW\*(C`USERPROFILE\*(C'\fR,\&\f(CW\*(C`APPDATA\*(C'\fR, \f(CW\*(C`WINDIR\*(C'\fR, \f(CW\*(C`SYS$LOGIN\*(C'\fR.  If the file exists, the optionsspecified there will be used as defaults, as if they were typed on thecommand line.  The defaults can be overridden by specifying new valueson the command line..PPThe action name must come at the beginning of the line, followed by anyamount of whitespace and then the options.  Options are given the sameas they would be on the command line.  They can be separated by anyamount of whitespace, including newlines, as long there is whitespace atthe beginning of each continued line.  Anything following a hash mark (\f(CW\*(C`#\*(C'\fR)is considered a comment, and is stripped before parsing.  If more thanone line begins with the same action name, those lines are merged intoone set of options..PPBesides the regular actions, there are two special pseudo-actions: thekey \f(CW\*(C`*\*(C'\fR (asterisk) denotes any global options that should be appliedto all actions, and the key 'Build_PL' specifies options to be appliedwhen you invoke \f(CW\*(C`perl Build.PL\*(C'\fR..PP.Vb 4\&  *        verbose=1   # global options\&  diff     flags=\-u\&  install  \-\-install_base /home/ken\&           \-\-install_path html=/home/ken/docs/html.Ve.PPIf you wish to locate your resource file in a different location, youcan set the environment variable '\s-1MODULEBUILDRC\s0' to the completeabsolute path of the file containing your options..SH "INSTALL PATHS".IX Header "INSTALL PATHS"[version 0.19].PPWhen you invoke Module::Build's \f(CW\*(C`build\*(C'\fR action, it needs to figureout where to install things.  The nutshell version of how this worksis that default installation locations are determined from\&\fIConfig.pm\fR, and they may be overridden by using the \f(CW\*(C`install_path\*(C'\fRparameter.  An \f(CW\*(C`install_base\*(C'\fR parameter lets you specify analternative installation root like \fI/home/foo\fR, and a \f(CW\*(C`destdir\*(C'\fR letsyou specify a temporary installation directory like \fI/tmp/install\fR incase you want to create bundled-up installable packages..PPNatively, Module::Build provides default installation locations forthe following types of installable items:.IP "lib" 4.IX Item "lib"Usually pure-Perl module files ending in \fI.pm\fR..IP "arch" 4.IX Item "arch"\&\*(L"Architecture-dependent\*(R" module files, usually produced by compiling\&\s-1XS\s0, Inline, or similar code..IP "script" 4.IX Item "script"Programs written in pure Perl.  In order to improve reuse, try to makethese as small as possible \- put the code into modules wheneverpossible..IP "bin" 4.IX Item "bin"\&\*(L"Architecture-dependent\*(R" executable programs, i.e. compiled C code orsomething.  Pretty rare to see this in a perl distribution, but ithappens..IP "bindoc" 4.IX Item "bindoc"Documentation for the stuff in \f(CW\*(C`script\*(C'\fR and \f(CW\*(C`bin\*(C'\fR.  Usuallygenerated from the \s-1POD\s0 in those files.  Under Unix, these are manualpages belonging to the 'man1' category..IP "libdoc" 4.IX Item "libdoc"Documentation for the stuff in \f(CW\*(C`lib\*(C'\fR and \f(CW\*(C`arch\*(C'\fR.  This is usuallygenerated from the \s-1POD\s0 in \fI.pm\fR files.  Under Unix, these are manualpages belonging to the 'man3' category..IP "binhtml" 4.IX Item "binhtml"This is the same as \f(CW\*(C`bindoc\*(C'\fR above, but applies to html documents..IP "libhtml" 4.IX Item "libhtml"This is the same as \f(CW\*(C`bindoc\*(C'\fR above, but applies to html documents..PPFour other parameters let you control various aspects of howinstallation paths are determined:.IP "installdirs" 4.IX Item "installdirs"The default destinations for these installable things come fromentries in your system's \f(CW\*(C`Config.pm\*(C'\fR.  You can select from threedifferent sets of default locations by setting the \f(CW\*(C`installdirs\*(C'\fRparameter as follows:.Sp.Vb 2\&                          \*(Aqinstalldirs\*(Aq set to:\&                   core          site                vendor\&\&              uses the following defaults from Config.pm:\&\&  lib     => installprivlib  installsitelib      installvendorlib\&  arch    => installarchlib  installsitearch     installvendorarch\&  script  => installscript   installsitebin      installvendorbin\&  bin     => installbin      installsitebin      installvendorbin\&  bindoc  => installman1dir  installsiteman1dir  installvendorman1dir\&  libdoc  => installman3dir  installsiteman3dir  installvendorman3dir\&  binhtml => installhtml1dir installsitehtml1dir installvendorhtml1dir [*]\&  libhtml => installhtml3dir installsitehtml3dir installvendorhtml3dir [*]\&\&  * Under some OS (eg. MSWin32) the destination for html documents is\&    determined by the C<Config.pm> entry C<installhtmldir>..Ve.SpThe default value of \f(CW\*(C`installdirs\*(C'\fR is \*(L"site\*(R".  If you're creatingvendor distributions of module packages, you may want to do somethinglike this:.Sp.Vb 1\&  perl Build.PL \-\-installdirs vendor.Ve.Spor.Sp.Vb 1\&  ./Build install \-\-installdirs vendor.Ve.SpIf you're installing an updated version of a module that was includedwith perl itself (i.e. a \*(L"core module\*(R"), then you may set\&\f(CW\*(C`installdirs\*(C'\fR to \*(L"core\*(R" to overwrite the module in its presentlocation..Sp(Note that the 'script' line is different from MakeMaker \-unfortunately there's no such thing as \*(L"installsitescript\*(R" or\&\*(L"installvendorscript\*(R" entry in \f(CW\*(C`Config.pm\*(C'\fR, so we use the\&\*(L"installsitebin\*(R" and \*(L"installvendorbin\*(R" entries to at least get thegeneral location right.  In the future, if \f(CW\*(C`Config.pm\*(C'\fR adds some moreappropriate entries, we'll start using those.).IP "install_path" 4.IX Item "install_path"Once the defaults have been set, you can override them..SpOn the command line, that would look like this:.Sp.Vb 1\&  perl Build.PL \-\-install_path lib=/foo/lib \-\-install_path arch=/foo/lib/arch.Ve.Spor this:.Sp.Vb 1\&  ./Build install \-\-install_path lib=/foo/lib \-\-install_path arch=/foo/lib/arch.Ve.IP "install_base" 4.IX Item "install_base"You can also set the whole bunch of installation paths by supplying the\&\f(CW\*(C`install_base\*(C'\fR parameter to point to a directory on your system.  Forinstance, if you set \f(CW\*(C`install_base\*(C'\fR to \*(L"/home/ken\*(R" on a Linuxsystem, you'll install as follows:.Sp.Vb 8\&  lib     => /home/ken/lib/perl5\&  arch    => /home/ken/lib/perl5/i386\-linux\&  script  => /home/ken/bin\&  bin     => /home/ken/bin\&  bindoc  => /home/ken/man/man1\&  libdoc  => /home/ken/man/man3\&  binhtml => /home/ken/html\&  libhtml => /home/ken/html.Ve.SpNote that this is \fIdifferent\fR from how MakeMaker's \f(CW\*(C`PREFIX\*(C'\fRparameter works.  \f(CW\*(C`install_base\*(C'\fR just gives you a default layout under thedirectory you specify, which may have little to do with the\&\f(CW\*(C`installdirs=site\*(C'\fR layout..SpThe exact layout under the directory you specify may vary by system \-we try to do the \*(L"sensible\*(R" thing on each platform..IP "destdir" 4.IX Item "destdir"If you want to install everything into a temporary directory first(for instance, if you want to create a directory tree that a packagemanager like \f(CW\*(C`rpm\*(C'\fR or \f(CW\*(C`dpkg\*(C'\fR could create a package from), you canuse the \f(CW\*(C`destdir\*(C'\fR parameter:.Sp.Vb 1\&  perl Build.PL \-\-destdir /tmp/foo.Ve.Spor.Sp.Vb 1\&  ./Build install \-\-destdir /tmp/foo.Ve.SpThis will effectively install to \*(L"/tmp/foo/$sitelib\*(R",\&\*(L"/tmp/foo/$sitearch\*(R", and the like, except that it will use\&\f(CW\*(C`File::Spec\*(C'\fR to make the pathnames work correctly on whateverplatform you're installing on..IP "prefix" 4.IX Item "prefix"Provided for compatibility with ExtUtils::MakeMaker's \s-1PREFIX\s0 argument.\&\f(CW\*(C`prefix\*(C'\fR should be used when you wish Module::Build to install yourmodules, documentation and scripts in the same placeExtUtils::MakeMaker does..SpThe following are equivalent..Sp.Vb 2\&    perl Build.PL \-\-prefix /tmp/foo\&    perl Makefile.PL PREFIX=/tmp/foo.Ve.SpBecause of the very complex nature of the prefixification logic, thebehavior of \s-1PREFIX\s0 in MakeMaker has changed subtly over time.Module::Build's \-\-prefix logic is equivalent to the \s-1PREFIX\s0 logic foundin ExtUtils::MakeMaker 6.30..SpIf you do not need to retain compatibility with ExtUtils::MakeMaker orare starting a fresh Perl installation we recommand you use\&\f(CW\*(C`install_base\*(C'\fR instead (and \f(CW\*(C`INSTALL_BASE\*(C'\fR in ExtUtils::MakeMaker).See \*(L"Instaling in the same location asExtUtils::MakeMaker\*(R" in Module::Build::Cookbook for further information..SH "MOTIVATIONS".IX Header "MOTIVATIONS"There are several reasons I wanted to start over, and not just fixwhat I didn't like about MakeMaker:.IP "\(bu" 4I don't like the core idea of MakeMaker, namely that \f(CW\*(C`make\*(C'\fR should beinvolved in the build process.  Here are my reasons:.RS 4.IP "+" 4When a person is installing a Perl module, what can you assume abouttheir environment?  Can you assume they have \f(CW\*(C`make\*(C'\fR?  No, but you canassume they have some version of Perl..IP "+" 4When a person is writing a Perl module for intended distribution, canyou assume that they know how to build a Makefile, so they cancustomize their build process?  No, but you can assume they know Perl,and could customize that way..RE.RS 4.SpFor years, these things have been a barrier to people getting thebuild/install process to do what they want..RE.IP "\(bu" 4There are several architectural decisions in MakeMaker that make itvery difficult to customize its behavior.  For instance, when usingMakeMaker you do \f(CW\*(C`use ExtUtils::MakeMaker\*(C'\fR, but the object created in\&\f(CW\*(C`WriteMakefile()\*(C'\fR is actually blessed into a package name that'screated on the fly, so you can't simply subclass\&\f(CW\*(C`ExtUtils::MakeMaker\*(C'\fR.  There is a workaround \f(CW\*(C`MY\*(C'\fR package that letsyou override certain MakeMaker methods, but only certain explicitlypreselected (by MakeMaker) methods can be overridden.  Also, the methodof customization is very crude: you have to modify a string containingthe Makefile text for the particular target.  Since these stringsaren't documented, and \fIcan't\fR be documented (they take on differentvalues depending on the platform, version of perl, version ofMakeMaker, etc.), you have no guarantee that your modifications willwork on someone else's machine or after an upgrade of MakeMaker orperl..IP "\(bu" 4It is risky to make major changes to MakeMaker, since it does so manythings, is so important, and generally works.  \f(CW\*(C`Module::Build\*(C'\fR is anentirely separate package so that I can work on it all I want, withoutworrying about backward compatibility..IP "\(bu" 4Finally, Perl is said to be a language for system administration.Could it really be the case that Perl isn't up to the task of buildingand installing software?  Even if that software is a bunch of stupidlittle \f(CW\*(C`.pm\*(C'\fR files that just need to be copied from one place toanother?  My sense was that we could design a system to accomplishthis in a flexible, extensible, and friendly manner.  Or die trying..SH "TO DO".IX Header "TO DO"The current method of relying on time stamps to determine whether aderived file is out of date isn't likely to scale well, since itrequires tracing all dependencies backward, it runs into problems on\&\s-1NFS\s0, and it's just generally flimsy.  It would be better to use an \s-1MD5\s0signature or the like, if available.  See \f(CW\*(C`cons\*(C'\fR for an example..PP.Vb 2\& \- append to perllocal.pod\& \- add a \*(Aqplugin\*(Aq functionality.Ve.SH "AUTHOR".IX Header "AUTHOR"Ken Williams <kwilliams@cpan.org>.PPDevelopment questions, bug reports, and patches should be sent to theModule-Build mailing list at <module\-build@perl.org>..PPBug reports are also welcome at<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module\-Build>..PPThe latest development version is available from the Subversionrepository at <https://svn.perl.org/modules/Module\-Build/trunk/>.SH "COPYRIGHT".IX Header "COPYRIGHT"Copyright (c) 2001\-2006 Ken Williams.  All rights reserved..PPThis library is free software; you can redistribute it and/ormodify it under the same terms as Perl itself..SH "SEE ALSO".IX Header "SEE ALSO"\&\fIperl\fR\|(1), Module::Build::Cookbook, Module::Build::Authoring,Module::Build::API, ExtUtils::MakeMaker, \s-1YAML\s0.PP\&\fI\s-1META\s0.yml\fR Specification:<http://module\-build.sourceforge.net/META\-spec\-current.html>.PP<http://www.dsmit.com/cons/>.PP<http://search.cpan.org/dist/PerlBuildSystem/>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -