~ubuntu-branches/ubuntu/edgy/libapache2-mod-perl2/edgy-updates

« back to all changes in this revision

Viewing changes to Apache-Test/lib/Apache/TestMM.pm

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2004-08-19 06:23:48 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040819062348-jxl4koqbtvgm8v2t
Tags: 1.99.14-4
Remove the LFS CFLAGS, and build-dep against apache2-*-dev (>= 2.0.50-10)
as we're backing out of the apache2/apr ABI transition.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright 2001-2004 The Apache Software Foundation
 
2
#
 
3
# Licensed under the Apache License, Version 2.0 (the "License");
 
4
# you may not use this file except in compliance with the License.
 
5
# You may obtain a copy of the License at
 
6
#
 
7
#     http://www.apache.org/licenses/LICENSE-2.0
 
8
#
 
9
# Unless required by applicable law or agreed to in writing, software
 
10
# distributed under the License is distributed on an "AS IS" BASIS,
 
11
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 
12
# See the License for the specific language governing permissions and
 
13
# limitations under the License.
 
14
#
1
15
package Apache::TestMM;
2
16
 
3
17
use strict;
76
90
 
77
91
    $body .= Apache::TestConfig->modperl_2_inc_fixup;
78
92
 
79
 
    if (@Apache::TestMM::Argv) {
80
 
        $body .= "\n\%Apache::TestConfig::Argv = qw(@Apache::TestMM::Argv);\n";
 
93
    my %args = @Apache::TestMM::Argv;
 
94
    while (my($k, $v) = each %args) {
 
95
        $v =~ s/\|/\\|/g;
 
96
        $body .= "\n\$Apache::TestConfig::Argv{'$k'} = q|$v|;\n";
81
97
    }
82
98
 
83
99
    my $in = Symbol::gensym();
150
166
  Apache::TestMM::filter_args();
151
167
  WriteMakefile(...);
152
168
 
153
 
When C<WriteMakefile()> is called it parses C<@ARGV>, hoping to find special
154
 
options like C<PREFIX=/home/stas/perl>. C<Apache::Test> accepts a lot of
155
 
options of its own. When C<Apache::TestMM::filter_args()> is called, it
156
 
removes any C<Apache::Test>-specific options from C<@ARGV> and stores them
157
 
internally, so when C<WriteMakefile()> is called they aren't in C<@ARGV> and
158
 
thus won't be processed by C<WriteMakefile()>.
 
169
When C<WriteMakefile()> is called it parses C<@ARGV>, hoping to find
 
170
special options like C<PREFIX=/home/stas/perl>. C<Apache::Test>
 
171
accepts a lot of configuration options of its own. When
 
172
C<Apache::TestMM::filter_args()> is called, it removes any
 
173
C<Apache::Test>-specific options from C<@ARGV> and stores them
 
174
internally, so when C<WriteMakefile()> is called they aren't in
 
175
C<@ARGV> and thus won't be processed by C<WriteMakefile()>.
159
176
 
160
177
The options can be set when F<Makefile.PL> is called:
161
178
 
177
194
 
178
195
which is going to be used by the C<Apache::Test> runtime.
179
196
 
 
197
The other frequently used options are: C<-httpd>, telling where to
 
198
find the httpd (usually when the C<-apxs> option is not used),
 
199
C<-libmodperl> to use a specific mod_perl shared object (if your
 
200
mod_perl is built as DSO), C<-maxclients> to change the default number
 
201
of the configured C<MaxClients> directive, C<-port> to start the
 
202
server on a specific port, etc. To get the complete list of available
 
203
configuration options and their purpose and syntax, run:
 
204
 
 
205
  % perl -MApache::TestConfig -le 'Apache::TestConfig::usage()'
 
206
 
 
207
You may wish to document some of these in your application's F<README>
 
208
file, especially the C<-apxs> and C<-httpd> options.
 
209
 
 
210
 
180
211
=head2 C<generate_script>
181
212
 
182
213
  Apache::TestMM::generate_script('t/TEST');