stas 2003/07/18 11:50:34
Modified: perl-framework/Apache-Test/lib/Apache TestMM.pm
Log:
improve the doc
Submitted by: David Wheeler <[EMAIL PROTECTED]>
Revision Changes Path
1.29 +21 -19
httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm
Index: TestMM.pm
===================================================================
RCS file:
/home/cvs/httpd-test/perl-framework/Apache-Test/lib/Apache/TestMM.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- TestMM.pm 18 Jul 2003 08:24:04 -0000 1.28
+++ TestMM.pm 18 Jul 2003 18:50:34 -0000 1.29
@@ -121,8 +121,8 @@
=head1 DESCRIPTION
C<Apache::TestMM> provides wrappers for the C<ExtUtils::MakeMaker>
-craft, making it easier to extend the autogenerated I<Makefile> with
-the C<Apache::Test>
+craft, making it easier to extend the autogenerated F<Makefile> with
+C<Apache::Test>.
=head1 FUNCTIONS
@@ -134,13 +134,15 @@
Apache::TestMM->import(qw(test clean));
-imports C<MY::> overrides for the default C<ExtUtils::MakeMaker>
+Imports C<MY::> overrides for the default C<ExtUtils::MakeMaker>
I<test> and I<clean> targets, as if you have defined:
sub MY::test {...}
sub MY::clean {...}
-in I<Makefile.PL>. C<Apache::TestMM> does this for you.
+in F<Makefile.PL>. C<Apache::TestMM> does this for you so that these Makefile
+targets will run the Apache server and the tests for it, and clean up after
+its mess.
=head2 C<filter_args>
@@ -148,19 +150,18 @@
Apache::TestMM::filter_args();
WriteMakefile(...);
-As you know when C<WriteMakefile()> is called it parses C<@ARGV>
-hoping to find special options like C<PREFIX=/home/stas/perl>. On the
-other hand C<Apache::Test> accepts a lot of options of its own. When
-C<Apache::TestMM::filter_args()> is called, it removes any
-C<Apache::Test> specific options from C<@ARGV> and stores them
-internally, so when C<WriteMakefile()> is called they aren't in
-C<ARGV>.
+When C<WriteMakefile()> is called it parses C<@ARGV>, hoping to find special
+options like C<PREFIX=/home/stas/perl>. C<Apache::Test> accepts a lot of
+options of its own. When C<Apache::TestMM::filter_args()> is called, it
+removes any C<Apache::Test>-specific options from C<@ARGV> and stores them
+internally, so when C<WriteMakefile()> is called they aren't in C<@ARGV> and
+thus won't be processed by C<WriteMakefile()>.
-The options can be set when I<Makefile.PL> is called:
+The options can be set when F<Makefile.PL> is called:
% perl Makefile.PL -apxs /path/to/apxs
-or you can push them manually to C<@ARGV> from the code:
+Or you can push them manually to C<@ARGV> from the code:
push @ARGV, '-apxs', $apxs_path;
@@ -168,9 +169,9 @@
Apache::TestMM::generate_script('t/TEST');
-is called, C<Apache::Test> specific options which were extracted by
+is called, C<Apache::Test>-specific options extracted by
C<Apache::TestMM::filter_args()> are written to the autogenerated
-file. In our example the autogenerated I<t/TEST> will include:
+file. In our example, the autogenerated F<t/TEST> will include:
%Apache::TestConfig::Argv = qw(apxs /path/to/apxs);
@@ -182,10 +183,11 @@
C<generate_script()> accepts the name of the script to generate and
will look for a template with the same name and suffix I<.PL>. So in
-our example it'll look for I<t/TEST.PL>. The autogenerated script
-I<t/TEST> will include the contents of I<t/TEST.PL>, and special
+our example it'll look for F<t/TEST.PL>. The autogenerated script
+F<t/TEST> will include the contents of F<t/TEST.PL>, and special
directives, including any configuration options passed via
-C<L<filter_args()|/C_filter_args_>> called from I<Makefile.PL>, special
-fixup code, etc.
+C<L<filter_args()|/C_filter_args_>> called from F<Makefile.PL>, special
+fixup code, etc. If no argument is passed to C<generate_script()>,
+it will create a file named F<t/TEST> by default.
=cut