/usr/share/doc/libapache2-mod-perl2-doc/docs/2.0/api/ModPerl/MM.html is in libapache2-mod-perl2-doc 2.0.10-2ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 | <?xml version="1.0" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:root@localhost" />
</head>
<body>
<ul id="index">
<li><a href="#NAME">NAME</a></li>
<li><a href="#Synopsis">Synopsis</a></li>
<li><a href="#Description">Description</a></li>
<li><a href="#MY::-Default-Methods">MY:: Default Methods</a>
<ul>
<li><a href="#ModPerl::MM::MY::post_initialize">ModPerl::MM::MY::post_initialize</a></li>
</ul>
</li>
<li><a href="#WriteMakefile-Default-Arguments">WriteMakefile() Default Arguments</a>
<ul>
<li><a href="#CCFLAGS">CCFLAGS</a></li>
<li><a href="#LIBS">LIBS</a></li>
<li><a href="#INC">INC</a></li>
<li><a href="#OPTIMIZE">OPTIMIZE</a></li>
<li><a href="#LDDLFLAGS">LDDLFLAGS</a></li>
<li><a href="#TYPEMAPS">TYPEMAPS</a></li>
<li><a href="#dynamic_lib">dynamic_lib</a>
<ul>
<li><a href="#OTHERLDFLAGS">OTHERLDFLAGS</a></li>
</ul>
</li>
<li><a href="#macro">macro</a>
<ul>
<li><a href="#MOD_INSTALL">MOD_INSTALL</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#Public-API">Public API</a>
<ul>
<li><a href="#WriteMakefile">WriteMakefile()</a></li>
<li><a href="#get_def_opt">get_def_opt()</a></li>
</ul>
</li>
</ul>
<h1 id="NAME">NAME</h1>
<p>ModPerl::MM -- A "subclass" of ExtUtils::MakeMaker for mod_perl 2.0</p>
<h1 id="Synopsis">Synopsis</h1>
<pre><code> use ModPerl::MM;
# ModPerl::MM takes care of doing all the dirty job of overriding
ModPerl::MM::WriteMakefile(...);
# if there is a need to extend the default methods
sub MY::constants {
my $self = shift;
$self->ModPerl::MM::MY::constants;
# do something else;
}
# or prevent overriding completely
sub MY::constants { shift->MM::constants(@_); }";
# override the default value of WriteMakefile's attribute
my $extra_inc = "/foo/include";
ModPerl::MM::WriteMakefile(
...
INC => $extra_inc,
...
);
# extend the default value of WriteMakefile's attribute
my $extra_inc = "/foo/include";
ModPerl::MM::WriteMakefile(
...
INC => join " ", $extra_inc, ModPerl::MM::get_def_opt('INC'),
...
);</code></pre>
<h1 id="Description">Description</h1>
<p><code>ModPerl::MM</code> is a "subclass" of <code>ExtUtils::MakeMaker</code> for mod_perl 2.0, to a degree of sub-classability of <code>ExtUtils::MakeMaker</code>.</p>
<p>When <code>ModPerl::MM::WriteMakefile()</code> is used instead of <code>ExtUtils::MakeMaker::WriteMakefile()</code>, <code>ModPerl::MM</code> overrides several <code>ExtUtils::MakeMaker</code> methods behind the scenes and supplies default <code>WriteMakefile()</code> arguments adjusted for mod_perl 2.0 build. It's written in such a way so that normally 3rd party module developers for mod_perl 2.0, don't need to mess with <i>Makefile.PL</i> at all.</p>
<h1 id="MY::-Default-Methods"><code>MY::</code> Default Methods</h1>
<p><code>ModPerl::MM</code> overrides method <i>foo</i> as long as <i>Makefile.PL</i> hasn't already specified a method <i>MY::foo</i>. If the latter happens, <code>ModPerl::MM</code> will DWIM and do nothing.</p>
<p>In case the functionality of <code>ModPerl::MM</code> methods needs to be extended, rather than completely overridden, the <code>ModPerl::MM</code> methods can be called internally. For example if you need to modify constants in addition to the modifications applied by <code>ModPerl::MM::MY::constants</code>, call the <code>ModPerl::MM::MY::constants</code> method (notice that it resides in the package <code>ModPerl::MM::MY</code> and not <code>ModPerl::MM</code>), then do your extra manipulations on constants:</p>
<pre><code> # if there is a need to extend the methods
sub MY::constants {
my $self = shift;
$self->ModPerl::MM::MY::constants;
# do something else;
}</code></pre>
<p>In certain cases a developers may want to prevent from <code>ModPerl::MM</code> to override certain methods. In that case an explicit override in <i>Makefile.PL</i> will do the job. For example if you don't want the <code>constants()</code> method to be overridden by <code>ModPerl::MM</code>, add to your <i>Makefile.PL</i>:</p>
<pre><code> sub MY::constants { shift->MM::constants(@_); }";</code></pre>
<p><code>ModPerl::MM</code> overrides the following methods:</p>
<h2 id="ModPerl::MM::MY::post_initialize"><code>ModPerl::MM::MY::post_initialize</code></h2>
<p>This method is deprecated.</p>
<h1 id="WriteMakefile-Default-Arguments"><code>WriteMakefile()</code> Default Arguments</h1>
<p><code>ModPerl::MM::WriteMakefile</code> supplies default arguments such as <code>INC</code> and <code>TYPEMAPS</code> unless they weren't passed to <code>ModPerl::MM::WriteMakefile</code> from <i>Makefile.PL</i>.</p>
<p>If the default values aren't satisfying these should be overridden in <i>Makefile.PL</i>. For example to supply an empty INC, explicitly set the argument in <i>Makefile.PL</i>.</p>
<pre><code> ModPerl::MM::WriteMakefile(
...
INC => '',
...
);</code></pre>
<p>If instead of fully overriding the default arguments, you want to extend or modify them, they can be retrieved using the <code>ModPerl::MM::get_def_opt()</code> function. The following example appends an extra value to the default <code>INC</code> attribute:</p>
<pre><code> my $extra_inc = "/foo/include";
ModPerl::MM::WriteMakefile(
...
INC => join " ", $extra_inc, ModPerl::MM::get_def_opt('INC'),
...
);</code></pre>
<p><code>ModPerl::MM</code> supplies default values for the following <code>ModPerl::MM::WriteMakefile</code> attributes:</p>
<h2 id="CCFLAGS"><code>CCFLAGS</code></h2>
<h2 id="LIBS"><code>LIBS</code></h2>
<h2 id="INC"><code>INC</code></h2>
<h2 id="OPTIMIZE"><code>OPTIMIZE</code></h2>
<h2 id="LDDLFLAGS"><code>LDDLFLAGS</code></h2>
<h2 id="TYPEMAPS"><code>TYPEMAPS</code></h2>
<h2 id="dynamic_lib"><code>dynamic_lib</code></h2>
<h3 id="OTHERLDFLAGS"><code>OTHERLDFLAGS</code></h3>
<pre><code> dynamic_lib => { OTHERLDFLAGS => ... }</code></pre>
<h2 id="macro"><code>macro</code></h2>
<h3 id="MOD_INSTALL"><code>MOD_INSTALL</code></h3>
<pre><code> macro => { MOD_INSTALL => ... }</code></pre>
<p>makes sure that Apache-Test/ is added to @INC.</p>
<h1 id="Public-API">Public API</h1>
<p>The following functions are a part of the public API. They are described elsewhere in this document.</p>
<h2 id="WriteMakefile"><code>WriteMakefile()</code></h2>
<pre><code> ModPerl::MM::WriteMakefile(...);</code></pre>
<h2 id="get_def_opt"><code>get_def_opt()</code></h2>
<pre><code> my $def_val = ModPerl::MM::get_def_opt($key);</code></pre>
</body>
</html>
|