client.html
来自「perl教程」· HTML 代码 · 共 483 行 · 第 1/2 页
HTML
483 行
</li>
<dt><strong><a name="item_validate__3d_3e__24bool">validate => $bool</a></strong>
<dd>
<p>If TRUE validate state from remote repositories even if state still
believed to be fresh. Will still send conditional requests.</p>
</dd>
</li>
<dt><strong><a name="item_max_ppd__3d_3e__24num">max_ppd => $num</a></strong>
<dd>
<p>If repository is an HTML document set limit for how many PPD links it
might contain. The default is 100.</p>
</dd>
</li>
<dt><strong><a name="item_repo__3d_3e__24repo_id">repo => $repo_id</a></strong>
<dd>
<p>Pass <a href="#item_repo"><code>repo</code></a> with an identifier to only sync the given repo.</p>
</dd>
</li>
</dl>
<dt><strong><a name="item_search">$client->search( $pattern )</a></strong>
<dt><strong>$client->search( $pattern, $field,... )</strong>
<dd>
<p>Will search for packages matching the given glob style $pattern.
Without further arguments this will return a list of package names.
With $field arguments it will return a list of array references, each
one filled in with the corresponding values for maching packages.</p>
</dd>
</li>
<dt><strong><a name="item_search_lookup">$client->search_lookup( $num )</a></strong>
<dd>
<p>Will look up the given package from the last <a href="#item_search"><code>search()</code></a> result, where
$num matches the 1-based index into the list returned by the last
search. This will return an <a href="../../../lib/ActivePerl/PPM/RepoPackage.html">the ActivePerl::PPM::RepoPackage manpage</a> object.</p>
</dd>
</li>
<dt><strong><a name="item_packages">$client->packages</a></strong>
<dt><strong>$client->packages( $field,... )</strong>
<dd>
<p>Without arguments returns the ids of packages available. In scalar
context returns the number of packages.</p>
</dd>
<dd>
<p>With arguments return a list of array references each one representing
one package. The elements of each array are the fields requested.
See <a href="../../../lib/ActivePerl/PPM/RepoPackage.html">the ActivePerl::PPM::RepoPackage manpage</a> for what field names are
available.</p>
</dd>
</li>
<dt><strong><a name="item_package">$client->package( $id )</a></strong>
<dt><strong>$client->package( $name )</strong>
<dt><strong>$client->package( $name, $version )</strong>
<dd>
<p>Returns the <a href="../../../lib/ActivePerl/PPM/RepoPackage.html">the ActivePerl::PPM::RepoPackage manpage</a> object matching the
arguments or <a href="../../../lib/Pod/perlfunc.html#item_undef"><code>undef</code></a> if none match. As there can be multiple
packages with the same name, an arbitrary one is selected if $name but
no $version is given.</p>
</dd>
</li>
<dt><strong><a name="item_feature_best">$client->feature_best( $feature )</a></strong>
<dd>
<p>Returns the highest version number provided for the given feature by
the packages found in all enabled repositories. The method return
<a href="../../../lib/Pod/perlfunc.html#item_undef"><code>undef</code></a> if no package provide this feature.</p>
</dd>
</li>
<dt><strong><a name="item_package_best">$client->package_best( $feature, $version )</a></strong>
<dd>
<p>Returns the best package of all enabled repositories that provide the
given feature at or better than the given version.</p>
</dd>
</li>
<dt><strong><a name="item_feature_have">$client->feature_have( $feature )</a></strong>
<dt><strong>$client->feature_have( $feature, @areas )</strong>
<dd>
<p>Returns the installed version number of the given feature. Returns
<a href="../../../lib/Pod/perlfunc.html#item_undef"><code>undef</code></a> if none of the installed packages provide this feature.</p>
</dd>
<dd>
<p>If one or more @areas are provided, only look in the areas given by
these names.</p>
</dd>
</li>
<dt><strong><a name="item_packages_depending_on">$client->packages_depending_on( $pkg, $area )</a></strong>
<dd>
<p>Returns the packages (as <code>ActivePerl::PPM::Package</code> objects) that
would "break" if the given package was uninstalled. This means that
the returned packages are those that depend on features that the given
package provide. In scalar context return number of packages.</p>
</dd>
<dd>
<p>The $pkg argument can be either a package name or a package object.</p>
</dd>
</li>
<dt><strong><a name="item_packages_missing">$client->packages_missing( %args )</a></strong>
<dd>
<p>Returns the list of packages to install in order to obtain the
requested features. The returned list consist of
<a href="../../../lib/ActivePerl/PPM/RepoPackage.html">the ActivePerl::PPM::RepoPackage manpage</a> objects. The attribute <code>_wanted</code>
will be TRUE if a package was requested directly. The attribute
<code>_needed_by</code> will be an array reference of package names listing
packages having resolved dependencies on this package. These
attributes do not exclude each other.</p>
</dd>
<dd>
<p>The returned list will be empty if all the requested features are
already installed.</p>
</dd>
<dd>
<p>The method will croak if nothing provides the requested features, if
dependencies can't be resolved or if the packages selected have
conflicting dependencies.</p>
</dd>
<dd>
<p>The arguments to the function are passed as key/value pairs:</p>
</dd>
<dl>
<dt><strong><a name="item_want__3d_3e__5c_40features">want => \@features</a></strong>
<dd>
<p>This is the list of features to resolve. The elements can be plain
strings denoting feature names, or references to arrays containing a
$name, $version pair. If $version is provided as <a href="../../../lib/Pod/perlfunc.html#item_undef"><code>undef</code></a> then this
is taken as an upgrade request and the function will try to find the
packages that provide the best possible version of this feature.</p>
</dd>
</li>
<dt><strong><a name="item_have__3d_3e__5c_40pkgs">have => \@pkgs</a></strong>
<dd>
<p>List of packages you already have decided to install. The function
will check if any of these packages provide needed features before
looking anywhere else.</p>
</dd>
</li>
<dt><strong><a name="item_want_deps__3d_3e__5c_40pkgs">want_deps => \@pkgs</a></strong>
<dd>
<p>Resolve any dependencies for the given packages.</p>
</dd>
</li>
<dt><strong><a name="item_area__3d_3e__5c_40areas">area => \@areas</a></strong>
<dd>
<p>List of names of install areas to consider when determining if
requested features or dependencies are already installed or not.</p>
</dd>
</li>
<dt><strong>force => $bool</strong>
<dd>
<p>If TRUE then return packages that provide the given features even if
they are already installed. Will also disable check for downgrades.</p>
</dd>
</li>
<dt><strong><a name="item_follow_deps__3d_3e__24str">follow_deps => $str</a></strong>
<dd>
<p>In what way should packages dependencies be resolved. The provided
$str can take the values <code>all</code>, <code>missing</code>, or <code>none</code>. The default
is <code>missing</code>. If $str is <code>all</code> then dependent packages are returned
even if they are already installed. If $str is <code>missing</code> then only
missing dependencies are returned. If $str is <code>none</code> then
dependencies are ignored.</p>
</dd>
</li>
<dt><strong><a name="item_error_handler__3d_3e__5c_26callback">error_handler => \&callback</a></strong>
<dd>
<p>Call the given error handler instead of croaking in the case of
trouble. Error messages are provided as argument. There can be more
than one.</p>
</dd>
<dd>
<p>Providing an error_handler allow the function to return missing
packages for working dependencies even if not all dependencies worked
out.</p>
</dd>
</li>
</dl>
<dt><strong><a name="item_install">$client->install( %args )</a></strong>
<dd>
<p>Will download, unpack and install the given packages. The function
will raise an exception of it gets into trouble, otherwise it will
return</p>
</dd>
<dd>
<p>The arguments to the function are passed as key/value pairs:</p>
</dd>
<dl>
<dt><strong><a name="item_packages__3d_3e__5c_40pkgs">packages => \@pkgs</a></strong>
<dd>
<p>Mandatory argument that provide the packages to install. The array
passed should contain <code>ActivePerl::PPM::Package</code> objects.</p>
</dd>
</li>
<dt><strong><a name="item_area__3d_3e__24area">area => $area</a></strong>
<dd>
<p>What install area to install into. If not provided, then
$client->default_install_area is used.</p>
</dd>
</li>
<dt><strong><a name="item_run_cb__3d_3e__5c_26func">run_cb => \&func</a></strong>
<dd>
<p>A callback function that should behave like &ActivePerl::Run::run
which will be called to execute the commands of the post install
script. If not provided, then &ActivePerl::Run::run will be used.</p>
</dd>
</li>
</dl>
</dl>
<p>
</p>
<hr />
<h1><a name="bugs">BUGS</a></h1>
<p>none.</p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?