ppd.html
来自「perl教程」· HTML 代码 · 共 435 行 · 第 1/2 页
HTML
435 行
<dd>
<p>When the script/command runs it uses the unpacked package tarball
(obtained by downloading the CODEREF) as the working directory, and
the following environment variables will be set:</p>
</dd>
<dl>
<dt><strong><a name="item_ppm_action">PPM_ACTION</a></strong>
<dd>
<p>One of "install", "upgrade" or "uninstall".</p>
</dd>
</li>
<dt><strong><a name="item_ppm_instarchlib">PPM_INSTARCHLIB</a></strong>
<dd>
<p>The archlib directory of the current install area.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_instlib">PPM_INSTLIB</a></strong>
<dd>
<p>The lib directory of the current install area.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_instpacklist">PPM_INSTPACKLIST</a></strong>
<dd>
<p>The name of the installed <em>.packlist</em> file of the package.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_instroot">PPM_INSTROOT</a></strong>
<dd>
<p>The prefix directory of the current install area.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_new_version">PPM_NEW_VERSION</a></strong>
<dd>
<p>The version label of the package just installed.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_perl">PPM_PERL</a></strong>
<dd>
<p>The path to the perl that runs PPM.</p>
</dd>
</li>
<dt><strong><a name="item_ppm_prev_version">PPM_PREV_VERSION</a></strong>
<dd>
<p>The version label that the package had before the upgrade started.
This variable is only present when PPM_ACTION is "upgrade".</p>
</dd>
</li>
<dt><strong><a name="item_ppm_version">PPM_VERSION</a></strong>
<dd>
<p>The version of PPM currently running.</p>
</dd>
</li>
</dl>
<dt><strong><a name="item__3cprovide_name_3d_22_2e_2e_2e_22_version_3d_22_2e"><PROVIDE NAME="..." VERSION="..."/></a></strong>
<dd>
<p>Required attribute is NAME. Optional attribute is VERSION. No
content. Element can be repeated any number of times. Parent must
be either SOFTPKG or IMPLEMENTATION.</p>
</dd>
<dd>
<p>The NAME represents a feature that this package provides if installed.
Any label goes. VERSION is a floating point number.</p>
</dd>
<dd>
<p>Packages containing perl modules should have one PROVIDE element for
each module installed by the package. Module names that do not
naturally contain double colon "::" should have "::" appended to them.</p>
</dd>
</li>
<dt><strong><a name="item__3crepository_3e_2e_2e_2e_3c_2frepository_3e"><REPOSITORY>...</REPOSITORY></a></strong>
<dd>
<p>Element must be root if present. Container for a set of SOFTPKG
elements. Optional attributes are ARCHITECTURE and BASE.</p>
</dd>
<dd>
<p>ARCHITECTECTURE provides the default for all contained SOFTPKG elements
that do not have an explicit ARCHITECTECTURE element.</p>
</dd>
<dd>
<p>BASE overrides the base URI that the relative URIs of CODEBASE, INSTALL
and UNINSTALL are resolved from. If BASE itself is relative, it is
first resolved based on the URI of the PPD document.</p>
</dd>
<dd>
<p>The file name <em>package.xml</em> is commonly used for documents
containing a REPOSITORY root.</p>
</dd>
</li>
<dt><strong><a name="item__3crepositorysummary_3e_2e_2e_2e_3c_2frepositorysu"><REPOSITORYSUMMARY>...</REPOSITORYSUMMARY></a></strong>
<dd>
<p>Treated the same as REPOSITORY. Supported for backwards compatibility
with old style <em>package.lst</em> files.</p>
</dd>
</li>
<dt><strong><a name="item__3crequire_name_3d_22_2e_2e_2e_22_version_3d_22_2e"><REQUIRE NAME="..." VERSION="..."/></a></strong>
<dd>
<p>Required attribute is NAME. Optional attribute is VERSION. No
content. Element might be repeated any number of times. Parent must
be either SOFTPKG or IMPLEMENTATION.</p>
</dd>
<dd>
<p>This element expresses a dependency on some other package that provides
the feature given by NAME and with the given version number or better.
A package that provides the given feature must be installed for this
package to work.</p>
</dd>
</li>
<dt><strong><a name="item__3csoftpkg_name_3d_22_2e_2e_2e_22_version_3d_22_2e"><SOFTPKG NAME="..." VERSION="..." DATE="...">...</SOFTPKG></a></strong>
<dd>
<p>Represents a package available for PPM to install. Container for all
the other elements defined here (except REPOSITORY and
REPOSITORYSUMMARY).</p>
</dd>
<dd>
<p>Required attributes are NAME and VERSION. Optional attribute is DATE.</p>
</dd>
<dd>
<p>The NAME and VERSION value can be any label. Older versions of this
specification had a more strict definition of VERSION as a sequence of
exactly 4 numbers in the range 0 to 65535 separated by comma. If such
values are encountered then they are converted to "standard" format by
replacing the commas with dots and trimming off ".0.0" or ".0".</p>
</dd>
<dd>
<p>The DATE attribute should use ISO 8601 formatted date (or datetime)
stamps. That is "YYYY-MM-DD" or "YYYY-MM-DDThh:mm:ssZ" format. See
<a href="http://en.wikipedia.org/wiki/ISO_8601">http://en.wikipedia.org/wiki/ISO_8601</a> for more information.</p>
</dd>
<dd>
<p>Parent must be REPOSITORY or REPOSITORYSUMMARY, or the SOFTPKG can be
the document root. Content elements can be in any order.</p>
</dd>
<dd>
<p>Documents where SOFTPKG is root are normally stored in files with the
<em>.ppd</em> extension.</p>
</dd>
</li>
<dt><strong><a name="item__3cuninstall_exec_3d_22_2e_2e_2e_22_href_3d_22_2e_"><UNINSTALL EXEC="..." HREF="..."/></a></strong>
<dt><strong><a name="item__3cuninstall_exec_3d_22_2e_2e_2e_22_3e_2e_2e_2e_3c"><UNINSTALL EXEC="...">...</UNINSTALL></a></strong>
<dd>
<p>Used for scripts that run just before the <code>blib</code> files of the package
is uninstalled. The attributes and content are treated the same as for
INSTALL and the same set of environment variables are availabe to the
script.</p>
</dd>
<dd>
<p>The uninstall script runs with a new, clean temporary directory
as its working directory. The directory and its content is removed after
the script finishes.</p>
</dd>
</li>
</dl>
<p>
</p>
<h2><a name="changes_since_ppm3">Changes since PPM3</a></h2>
<p>The PPD format has changed in PPM4. This section lists the differences:</p>
<ul>
<li>
<p>The format of the SOFTPKG/VERSION attribute has been relaxed. This
attribute should now contain the version identifier as used for the
original package. PPM will not be able to order packages based on
this label.</p>
</li>
<li>
<p>The SOFTPKG/DATE attribute has been introduced. This should be the
release date of the package. For CPAN packages this should be the
date when the package was uploaded to CPAN.</p>
</li>
<li>
<p>Added REQUIRE and PROVIDE elements that are used to describe
features that this package depends on and provides. The NAME
attribute is required for both. The VERSION attribute is optional and
should be a floating number. Features are assumed to be backwards
compatible and a feature with a higher version number is regarded
as better.</p>
</li>
<li>
<p>The DEPENDENCY elements are deprecated. Use REQUIRE instead. If
present they are mapped to REQUIRE but their VERSION attribute is
ignored.</p>
</li>
<li>
<p>The OS, OSVERSION, PROCESSOR, PERLCORE elements are deprecated and
always ignored. Implementations are matched using the ARCHITECTURE
element only.</p>
</li>
<li>
<p>The TITLE element is deprecated and ignored. The SOFTPKG/NAME
attribute is the title.</p>
</li>
</ul>
<p>
</p>
<hr />
<h1><a name="see_also">SEE ALSO</a></h1>
<p><a href="../../../lib/ActivePerl/PPM/Package.html">the ActivePerl::PPM::Package manpage</a>, <a href="http://www.w3.org/TR/NOTE-OSD">http://www.w3.org/TR/NOTE-OSD</a></p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?