~ubuntu-branches/ubuntu/intrepid/perl-doc-html/intrepid

« back to all changes in this revision

Viewing changes to ExtUtils/Installed.html

  • Committer: Bazaar Package Importer
  • Author(s): Roberto C. Sanchez
  • Date: 2008-05-17 20:14:19 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080517201419-qgbuogq2ckkdisyi
Tags: 5.10.0-2
Supersede botched upload of 5.10.0-1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
      <h2>Links:</h2>
55
55
      <ul>
56
56
        <li><a href="http://search.cpan.org">CPAN</a></li>
 
57
        <li><a href="http://www.perl.org">Perl.org</a></li>
57
58
        <li><a href="http://www.perl.com">Perl.com</a></li>
58
 
        <li><a href="http://www.perl.org">Perl.org</a></li>
 
59
        <li><a href="http://perlbuzz.com">Perl Buzz</a></li>
 
60
        <li><a href="http://www.perlfoundation.org/perl5/index.cgi">Perl 5 Wiki</a></li>
 
61
        <li><a href="http://jobs.perl.org">Perl Jobs</a></li>
59
62
        <li><a href="http://www.pm.org">Perl Mongers</a></li>
60
63
        <li><a href="http://www.perlmonks.org">Perl Monks</a></li>
61
64
        <li><a href="http://planet.perl.org">Planet Perl</a></li>
65
68
      <ul>
66
69
        <li>Site maintained by<br><a href="http://perl.jonallen.info">Jon Allen</a>
67
70
            (<a href="http://perl.jonallen.info">JJ</a>)</li>
68
 
        <li class="spaced">Last updated on<br>23 April 2006</li>
 
71
        <li class="spaced">Last updated on<br>23 December 2007</li>
69
72
        <li class="spaced">See the <a href="http://perl.jonallen.info/projects/perldoc">project page</a> for
70
73
        more details</li>
71
74
      </ul>
76
79
    <div id="centerContent">
77
80
      <div id="contentHeader">
78
81
        <div id="contentHeaderLeft"><a href="#" onClick="showLeft()">Show navigation</a></div>
79
 
        <div id="contentHeaderCentre">-- Perl 5.8.8 documentation --</div>
 
82
        <div id="contentHeaderCentre">-- Perl 5.10.0 documentation --</div>
80
83
        <div id="contentHeaderRight"><a href="#" onClick="showRight()">Show toolbar</a></div>
81
84
      </div>
82
85
      <div id="breadCrumbs"><a href="../index.html">Home</a> &gt; <a href="../index-modules-A.html">Core modules</a> &gt; <a href="../index-modules-E.html">E</a> &gt; ExtUtils::Installed</div>
84
87
      <div id="contentBody"><div class="title_container"><div class="page_title">ExtUtils::Installed</div></div><ul><li><a href="#NAME">NAME</a><li><a href="#SYNOPSIS">SYNOPSIS</a><li><a href="#DESCRIPTION">DESCRIPTION</a><li><a href="#USAGE">USAGE</a><li><a href="#FUNCTIONS">FUNCTIONS</a><li><a href="#EXAMPLE">EXAMPLE</a><li><a href="#AUTHOR">AUTHOR</a></ul><a name="NAME"></a><h1>NAME</h1>
85
88
<p>ExtUtils::Installed - Inventory management of installed modules</p>
86
89
<a name="SYNOPSIS"></a><h1>SYNOPSIS</h1>
87
 
<pre class="verbatim">   <a class="l_k" href="../functions/use.html">use</a> <a class="l_w" href="../ExtUtils/Installed.html">ExtUtils::Installed</a><span class="sc">;</span>
88
 
   <a class="l_k" href="../functions/my.html">my</a> <span class="s">(</span><span class="i">$inst</span><span class="s">)</span> = <a class="l_w" href="../ExtUtils/Installed.html">ExtUtils::Installed</a>-&gt;new<span class="s">(</span><span class="s">)</span><span class="sc">;</span>
 
90
<pre class="verbatim">   <a class="l_k" href="../functions/use.html">use</a> <span class="w">ExtUtils::Installed</span><span class="sc">;</span>
 
91
   <a class="l_k" href="../functions/my.html">my</a> <span class="s">(</span><span class="i">$inst</span><span class="s">)</span> = <span class="w">ExtUtils::Installed</span><span class="w">-&gt;new</span><span class="s">(</span><span class="s">)</span><span class="sc">;</span>
89
92
   <a class="l_k" href="../functions/my.html">my</a> <span class="s">(</span><span class="i">@modules</span><span class="s">)</span> = <span class="i">$inst</span><span class="i">-&gt;modules</span><span class="s">(</span><span class="s">)</span><span class="sc">;</span>
90
93
   <a class="l_k" href="../functions/my.html">my</a> <span class="s">(</span><span class="i">@missing</span><span class="s">)</span> = <span class="i">$inst</span><span class="i">-&gt;validate</span><span class="s">(</span><span class="q">&quot;DBI&quot;</span><span class="s">)</span><span class="sc">;</span>
91
94
   <a class="l_k" href="../functions/my.html">my</a> <span class="i">$all_files</span> = <span class="i">$inst</span><span class="i">-&gt;files</span><span class="s">(</span><span class="q">&quot;DBI&quot;</span><span class="s">)</span><span class="sc">;</span>
102
105
<a name="USAGE"></a><h1>USAGE</h1>
103
106
<p>The new() function searches for all the installed .packlists on the system, and
104
107
stores their contents. The .packlists can be queried with the functions
105
 
described below.</p>
 
108
described below. Where it searches by default is determined by the settings found
 
109
in <code class="inline"><span class="i">%Config::Config</span></code>
 
110
, and what the value is of the PERL5LIB environment variable.</p>
106
111
<a name="FUNCTIONS"></a><h1>FUNCTIONS</h1>
107
112
<ul>
108
113
<li><a name="new()"></a><b>new()</b>
109
 
<p>This takes no parameters, and searches for all the installed .packlists on the
110
 
system.  The packlists are read using the ExtUtils::packlist module.</p>
 
114
<p>This takes optional named parameters. Without parameters, this
 
115
searches for all the installed .packlists on the system using
 
116
information from <code class="inline"><span class="i">%Config::Config</span></code>
 
117
 and the default module search
 
118
paths <code class="inline"><span class="i">@INC</span></code>
 
119
. The packlists are read using the
 
120
<a href="../ExtUtils/Packlist.html">ExtUtils::Packlist</a> module.</p>
 
121
<p>If the named parameter <code class="inline"><span class="w">config_override</span></code>
 
122
 is specified,
 
123
it should be a reference to a hash which contains all information
 
124
usually found in <code class="inline"><span class="i">%Config::Config</span></code>
 
125
. For example, you can obtain
 
126
the configuration information for a separate perl installation and
 
127
pass that in.</p>
 
128
<pre class="verbatim">    <a class="l_k" href="../functions/my.html">my</a> <span class="i">$yoda_cfg</span>  = <span class="i">get_fake_config</span><span class="s">(</span><span class="q">'yoda'</span><span class="s">)</span><span class="sc">;</span>
 
129
    <a class="l_k" href="../functions/my.html">my</a> <span class="i">$yoda_inst</span> = <span class="w">ExtUtils::Installed</span><span class="w">-&gt;new</span><span class="s">(</span><span class="w">config_override</span><span class="cm">=&gt;</span><span class="i">$yoda_cfg</span><span class="s">)</span><span class="sc">;</span></pre>
 
130
<p>Similarly, the parameter <code class="inline"><span class="w">inc_override</span></code>
 
131
 may be a reference to an
 
132
array which is used in place of the default module search paths
 
133
from <code class="inline"><span class="i">@INC</span></code>
 
134
.</p>
 
135
<pre class="verbatim">    <a class="l_k" href="../functions/use.html">use</a> <span class="w">Config</span><span class="sc">;</span>
 
136
    <a class="l_k" href="../functions/my.html">my</a> <span class="i">@dirs</span> = <a class="l_k" href="../functions/split.html">split</a><span class="s">(</span><span class="q">/\Q$Config{path_sep}\E/</span><span class="cm">,</span> <span class="i">$ENV</span>{<span class="w">PERL5LIB</span>}<span class="s">)</span><span class="sc">;</span>
 
137
    <a class="l_k" href="../functions/my.html">my</a> <span class="i">$p5libs</span> = <span class="w">ExtUtils::Installed</span><span class="w">-&gt;new</span><span class="s">(</span><span class="w">inc_override</span><span class="cm">=&gt;</span>\<span class="i">@dirs</span><span class="s">)</span><span class="sc">;</span></pre>
 
138
<p>The parameter c&lt;extra_libs&gt; can be used to specify <b>additional</b> paths to 
 
139
search for installed modules. For instance</p>
 
140
<pre class="verbatim">    <a class="l_k" href="../functions/my.html">my</a> <span class="i">$installed</span> = <span class="w">ExtUtils::Installed</span><span class="w">-&gt;new</span><span class="s">(</span><span class="w">extra_libs</span><span class="cm">=&gt;</span><span class="s">[</span><span class="q">&quot;/my/lib/path&quot;</span><span class="s">]</span><span class="s">)</span><span class="sc">;</span></pre>
 
141
<p>This should only be necessary if <code class="inline">/my/lib/path</code> is not in PERL5LIB.</p>
111
142
</li>
112
143
<li><a name="modules()"></a><b>modules()</b>
113
144
<p>This returns a list of the names of all the installed modules.  The perl 'core'
169
200
          <!--<select name="r"><option value="1" selected>Go to top result<option value="0">Show results list</select>-->
170
201
        </form>
171
202
      </p>
 
203
      <script language="JavaScript" type="text/javascript" src="/perl-version.js"></script>
172
204
      <h2>Labels:</h2>
173
205
      <p>
174
206
        <a href="#" onClick="addLabel('ExtUtils::Installed','ExtUtils/Installed.html')">Add this page</a>