install.html
来自「perl教程」· HTML 代码 · 共 208 行
HTML
208 行
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>ExtUtils::Install - install files from here to there</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',2);</script>
<h1><a>ExtUtils::Install - install files from here to there</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<ul>
<li><a href="#functions">Functions</a></li>
</ul>
<li><a href="#environment">ENVIRONMENT</a></li>
<li><a href="#author">AUTHOR</a></li>
<li><a href="#license">LICENSE</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>ExtUtils::Install - install files from here to there</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
<span class="keyword">use</span> <span class="variable">ExtUtils::Install</span><span class="operator">;</span>
</pre>
<pre>
<span class="variable">install</span><span class="operator">(</span><span class="operator">{</span> <span class="string">'blib/lib'</span> <span class="operator">=></span> <span class="string">'some/install/dir'</span> <span class="operator">}</span> <span class="operator">);</span>
</pre>
<pre>
<span class="variable">uninstall</span><span class="operator">(</span><span class="variable">$packlist</span><span class="operator">);</span>
</pre>
<pre>
<span class="variable">pm_to_blib</span><span class="operator">(</span><span class="operator">{</span> <span class="string">'lib/Foo/Bar.pm'</span> <span class="operator">=></span> <span class="string">'blib/lib/Foo/Bar.pm'</span> <span class="operator">}</span><span class="operator">);</span>
</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>Handles the installing and uninstalling of perl modules, scripts, man
pages, etc...</p>
<p>Both <a href="#item_install"><code>install()</code></a> and <a href="#item_uninstall"><code>uninstall()</code></a> are specific to the way
ExtUtils::MakeMaker handles the installation and deinstallation of
perl modules. They are not designed as general purpose tools.</p>
<p>
</p>
<h2><a name="functions">Functions</a></h2>
<dl>
<dt><strong><a name="item_install"><strong>install</strong></a></strong>
<dd>
<pre>
<span class="variable">install</span><span class="operator">(\</span><span class="variable">%from_to</span><span class="operator">);</span>
<span class="variable">install</span><span class="operator">(\</span><span class="variable">%from_to</span><span class="operator">,</span> <span class="variable">$verbose</span><span class="operator">,</span> <span class="variable">$dont_execute</span><span class="operator">,</span> <span class="variable">$uninstall_shadows</span><span class="operator">);</span>
</pre>
</dd>
<dd>
<p>Copies each directory tree of %from_to to its corresponding value
preserving timestamps and permissions.</p>
</dd>
<dd>
<p>There are two keys with a special meaning in the hash: "read" and
"write". These contain packlist files. After the copying is done,
<a href="#item_install"><code>install()</code></a> will write the list of target files to $from_to{write}. If
$from_to{read} is given the contents of this file will be merged into
the written file. The read and the written file may be identical, but
on AFS it is quite likely that people are installing to a different
directory than the one where the files later appear.</p>
</dd>
<dd>
<p>If $verbose is true, will print out each file removed. Default is
false. This is "make install VERBINST=1"</p>
</dd>
<dd>
<p>If $dont_execute is true it will only print what it was going to do
without actually doing it. Default is false.</p>
</dd>
<dd>
<p>If $uninstall_shadows is true any differing versions throughout @INC
will be uninstalled. This is "make install UNINST=1"</p>
</dd>
<dt><strong><a name="item_install_default"><strong>install_default</strong> <em>DISCOURAGED</em></a></strong>
<dd>
<pre>
<span class="variable">install_default</span><span class="operator">();</span>
<span class="variable">install_default</span><span class="operator">(</span><span class="variable">$fullext</span><span class="operator">);</span>
</pre>
</dd>
<dd>
<p>Calls <a href="#item_install"><code>install()</code></a> with arguments to copy a module from blib/ to the
default site installation location.</p>
</dd>
<dd>
<p>$fullext is the name of the module converted to a directory
(ie. Foo::Bar would be Foo/Bar). If $fullext is not specified, it
will attempt to read it from @ARGV.</p>
</dd>
<dd>
<p>This is primarily useful for install scripts.</p>
</dd>
<dd>
<p><strong>NOTE</strong> This function is not really useful because of the hard-coded
install location with no way to control site vs core vs vendor
directories and the strange way in which the module name is given.
Consider its use discouraged.</p>
</dd>
<dt><strong><a name="item_uninstall"><strong>uninstall</strong></a></strong>
<dd>
<pre>
<span class="variable">uninstall</span><span class="operator">(</span><span class="variable">$packlist_file</span><span class="operator">);</span>
<span class="variable">uninstall</span><span class="operator">(</span><span class="variable">$packlist_file</span><span class="operator">,</span> <span class="variable">$verbose</span><span class="operator">,</span> <span class="variable">$dont_execute</span><span class="operator">);</span>
</pre>
</dd>
<dd>
<p>Removes the files listed in a $packlist_file.</p>
</dd>
<dd>
<p>If $verbose is true, will print out each file removed. Default is
false.</p>
</dd>
<dd>
<p>If $dont_execute is true it will only print what it was going to do
without actually doing it. Default is false.</p>
</dd>
<dt><strong><a name="item_pm_to_blib"><strong>pm_to_blib</strong></a></strong>
<dd>
<pre>
<span class="variable">pm_to_blib</span><span class="operator">(\</span><span class="variable">%from_to</span><span class="operator">,</span> <span class="variable">$autosplit_dir</span><span class="operator">);</span>
<span class="variable">pm_to_blib</span><span class="operator">(\</span><span class="variable">%from_to</span><span class="operator">,</span> <span class="variable">$autosplit_dir</span><span class="operator">,</span> <span class="variable">$filter_cmd</span><span class="operator">);</span>
</pre>
</dd>
<dd>
<p>Copies each key of %from_to to its corresponding value efficiently.
Filenames with the extension .pm are autosplit into the $autosplit_dir.
Any destination directories are created.</p>
</dd>
<dd>
<p>$filter_cmd is an optional shell command to run each .pm file through
prior to splitting and copying. Input is the contents of the module,
output the new module contents.</p>
</dd>
<dd>
<p>You can have an environment variable PERL_INSTALL_ROOT set which will
be prepended as a directory to each installed file (and directory).</p>
</dd>
</dl>
<p>
</p>
<hr />
<h1><a name="environment">ENVIRONMENT</a></h1>
<dl>
<dt><strong><a name="item_perl_install_root"><strong>PERL_INSTALL_ROOT</strong></a></strong>
<dd>
<p>Will be prepended to each install path.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="author">AUTHOR</a></h1>
<p>Original author lost in the mists of time. Probably the same as Makemaker.</p>
<p>Currently maintained by Michael G Schwern <code>schwern@pobox.com</code></p>
<p>Send patches and ideas to <code>makemaker@perl.org</code>.</p>
<p>Send bug reports via <a href="http://rt.cpan.org/.">http://rt.cpan.org/.</a> Please send your
generated Makefile along with your report.</p>
<p>For more up-to-date information, see <a href="http://www.makemaker.org">http://www.makemaker.org</a>.</p>
<p>
</p>
<hr />
<h1><a name="license">LICENSE</a></h1>
<p>This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.</p>
<p>See <a href="http://www.perl.com/perl/misc/Artistic.html">http://www.perl.com/perl/misc/Artistic.html</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?