📄 ch08_75.htm
字号:
<html><head><title>ExtUtils::Manifest (Perl in a Nutshell, 2nd Edition)</title><link rel="stylesheet" type="text/css" href="../style/style1.css" /><meta name="DC.Creator" content="Stephen Spainhour" /><meta name="DC.Format" content="text/xml" scheme="MIME" /><meta name="DC.Language" content="en-US" /><meta name="DC.Publisher" content="O'Reilly & Associates, Inc." /><meta name="DC.Source" scheme="ISBN" content="0596002416L" /><meta name="DC.Subject.Keyword" content="stuff" /><meta name="DC.Title" content="Perl in a Nutshell, 2nd Edition" /><meta name="DC.Type" content="Text.Monograph" /></head><body bgcolor="#ffffff"><img src="gifs/smbanner.gif" usemap="#banner-map" border="0" alt="Book Home" /><map name="banner-map"><area shape="rect" coords="1,-2,616,66" href="index.htm" alt="Java and XSLT" /><area shape="rect" coords="629,-11,726,25" href="jobjects/fsearch.htm" alt="Search this book" /></map><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch08_74.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228" /><td align="right" valign="top" width="228"><a href="ch08_76.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr></table></div><h2 class="sect1">8.75. ExtUtils::Manifest</h2><p><a name="INDEX-1420" />Provides utilities for maintaining andusing a MANIFEST file. The MANIFEST file is essentially a packinglist, included with a module, so the user who installs the module canbe sure that all the files are actually present. The file created byExtUtils::Manifest is a list of filenames, one per line, with anoptional comment on each line.</p><p>ExtUtils::Manifest optionally uses a file called MANIFEST.SKIP, whichcontains regular expressions specifying files that are not to beincluded in MANIFEST. Manifest also defines two global variables thatare used by several of the functions:</p><dl><dt><b><tt class="literal">$ExtUtils::Manifest::MANIFEST</tt></b></dt><dd>The name of the MANIFEST file. Changing the value results indifferent MANIFEST and different MANIFEST.SKIP files. Default isMANIFEST.</p></dd><dt><b><tt class="literal">$ExtUtils::Manifest::Quiet</tt></b></dt><dd>If true, the functions work silently. Default is <tt class="literal">0</tt>.</p></dd></dl><p>Provides six functions, which are exportable on request.</p><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>filecheck</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>filecheck</pre><p>Finds files below the current directory that are not mentioned in theMANIFEST file. Consults MANIFEST.SKIP for files thatshouldn't be included.</p></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>fullcheck</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>fullcheck</pre><p>Does both <tt class="literal">manicheck</tt> and<tt class="literal">filecheck</tt>.</p></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>manicheck</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>manicheck</pre><p>Checks whether all files in current directory'sMANIFEST file really exist.</p></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>manicopy</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>manicopy (<em class="replaceable">read</em>, <em class="replaceable">target</em>, <em class="replaceable">how</em>)</pre><p>Copies files to a target directory. Takes the following arguments:</p><dl><dt><i><em class="replaceable"><tt>read</tt></em></i></dt><dd>Hash with keys that are the names of the files to be copied.Typically returned by <tt class="literal">maniread</tt>.</p></dd><dt><i><em class="replaceable"><tt>target</tt></em></i></dt><dd>Target directory into which files are to be copied.</p></dd><dt><i><em class="replaceable"><tt>how</tt></em></i></dt><dd>Can be used to specify a different method of"copying." Values are:</p><dl><dt><b><tt class="literal">cp</tt></b></dt><dd>Copy the files.</p></dd><dt><b><tt class="literal">ln</tt></b></dt><dd>Create hard links.</p></dd><dt><b><tt class="literal">best</tt></b></dt><dd>Link the files, but copy any symbolic link to make a tree with nosymbolic links (the default).</p></dd></dl></dd></dl></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>manifind</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>manifind</pre><p>Returns a hash reference whose keys are the files found below thecurrent directory. The values are null strings, representing theMANIFEST comments that aren't there.</p></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>maniread</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>maniread ([<em class="replaceable">file</em>])</pre><p>Reads the MANIFEST file specified in<tt class="literal">$</tt><em class="replaceable"><tt>file</tt></em> (the default isMANIFEST). Returns a hash reference whose keys are the filenames andwhose values are the comments. Discards blank lines and linesstarting with <tt class="literal">#</tt>.</p></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>mkmanifest</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>mkmanifest</pre><p>Writes the names of all files in and below the current directory tothe file in the current directory named in the<tt class="literal">$ExtUtils::Manifest::MANIFEST</tt> variable. Skipsfiles in MANIFEST.SKIP.</p></div><div class="refentry"><table width="515" border="0" cellpadding="5"><tr><td align="left"><font size="+1"><b>skipcheck</b></font></td><td align="right"><i></i></td></tr></table><hr width="515" size="3" noshade="true" align="left" color="black" /><pre>skipcheck</pre><p>Lists files that were skipped because they were found inMANIFEST.SKIP.</p></div><hr width="684" align="left" /><div class="navbar"><table width="684" border="0"><tr><td align="left" valign="top" width="228"><a href="ch08_74.htm"><img src="../gifs/txtpreva.gif" alt="Previous" border="0" /></a></td><td align="center" valign="top" width="228"><a href="index.htm"><img src="../gifs/txthome.gif" alt="Home" border="0" /></a></td><td align="right" valign="top" width="228"><a href="ch08_76.htm"><img src="../gifs/txtnexta.gif" alt="Next" border="0" /></a></td></tr><tr><td align="left" valign="top" width="228">8.74. ExtUtils::MakeMaker</td><td align="center" valign="top" width="228"><a href="index/index.htm"><img src="../gifs/index.gif" alt="Book Index" border="0" /></a></td><td align="right" valign="top" width="228">8.76. ExtUtils::Miniperl</td></tr></table></div><hr width="684" align="left" /><img src="../gifs/navbar.gif" usemap="#library-map" border="0" alt="Library Navigation Links" /><p><p><font size="-1"><a href="copyrght.htm">Copyright © 2002</a> O'Reilly & Associates. All rights reserved.</font></p><map name="library-map"><area shape="rect" coords="1,0,85,94" href="../index.htm"><area shape="rect" coords="86,1,178,103" href="../lwp/index.htm"><area shape="rect" coords="180,0,265,103" href="../lperl/index.htm"><area shape="rect" coords="267,0,353,105" href="../perlnut/index.htm"><area shape="rect" coords="354,1,446,115" href="../prog/index.htm"><area shape="rect" coords="448,0,526,132" href="../tk/index.htm"><area shape="rect" coords="528,1,615,119" href="../cookbook/index.htm"><area shape="rect" coords="617,0,690,135" href="../pxml/index.htm"></map></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -