bugzilla-4intranet/docs/en/html/api/Bugzilla/Install/CPAN.html

80 lines
3.0 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>
Bugzilla::Install::CPAN</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" title="style" type="text/css" href="../.././../../../style.css" media="all" >
</head>
<body id="pod">
<p class="backlinktop"><b><a name="___top" href="../../index.html" accesskey="1" title="All Documents">&lt;&lt;</a></b></p>
<h1>Bugzilla::Install::CPAN</h1>
<div class='indexgroup'>
<ul class='indexList indexList1'>
<li class='indexItem indexItem1'><a href='#NAME'>NAME</a>
<li class='indexItem indexItem1'><a href='#SYNOPSIS'>SYNOPSIS</a>
<li class='indexItem indexItem1'><a href='#DESCRIPTION'>DESCRIPTION</a>
<li class='indexItem indexItem1'><a href='#SUBROUTINES'>SUBROUTINES</a>
</ul>
</div>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="NAME"
>NAME</a></h1>
<p>Bugzilla::Install::CPAN - Routines to install Perl modules from CPAN.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SYNOPSIS"
>SYNOPSIS</a></h1>
<pre class="code"> use Bugzilla::Install::CPAN;
set_cpan_config();
install_module(&#39;Module::Name&#39;);</pre>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="DESCRIPTION"
>DESCRIPTION</a></h1>
<p>This is primarily used by <a href="../../install-module.html" class="podlinkpod"
>install-module</a> to do the &#34;hard work&#34; of installing CPAN modules.</p>
<h1><a class='u' href='#___top' title='click to go to top of document'
name="SUBROUTINES"
>SUBROUTINES</a></h1>
<dl>
<dt><a name="set_cpan_config"
><code class="code">set_cpan_config</code></a></dt>
<dd>
<p>Sets up the configuration of CPAN for this session. Must be called before <a href="#install_module" class="podlinkpod"
>&#34;install_module&#34;</a>. Takes one boolean parameter. If true, <a href="#install_module" class="podlinkpod"
>&#34;install_module&#34;</a> will install modules globally instead of to the local <em class="code">lib/</em> directory. On most systems, you have to be root to do that.</p>
<dt><a name="install_module"
><code class="code">install_module</code></a></dt>
<dd>
<p>Installs a module from CPAN. Takes two arguments:</p>
<dl>
<dt><a name="$name_-_The_name_of_the_module,_just_like_you&#39;d_pass_to_the_install_command_in_the_CPAN_shell."
><code class="code">$name</code> - The name of the module, just like you&#39;d pass to the <code class="code">install</code> command in the CPAN shell.</a></dt>
<dd>
<dt><a
><code class="code">$test</code> - If true, we run tests on this module before installing, but we still force the install if the tests fail. This is only used when we internally install a newer CPAN module.</a></dt>
</dl>
<p>Note that calling this function prints a <b>lot</b> of information to STDOUT and STDERR.</p>
</dd>
</dl>
<p class="backlinkbottom"><b><a name="___bottom" href="../../index.html" title="All Documents">&lt;&lt;</a></b></p>
<!-- end doc -->
</body></html>