Wrong code example in /docs/general/testing/testing.html

Martín Ferrari <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CAL60Pd-+3ghpXwW+AppkTOndMn1W4XM4Sm8k2d4X0WrkZNP7vw@mail.gmail.com>
Hi,

I was trying to set up a test environment for a mod_perl module, and
-among many other problems I had with the docs, that I'll try to put
in other reports-, I've found some code that does not even compile,
and is missing required modules, under
http://perl.apache.org/docs/general/testing/testing.html#Developing_Response_only_Part_of_a_Test

The patch I manually generated (I don't have the sources for the docs):

@@ -1,21 +1,23 @@
 #file:t/response/TestApache/write.pm
 #-----------------------------------
 package TestApache::write;

 use strict;
 use warnings FATAL => 'all';

 use constant BUFSIZ => 512; #small for testing
 use Apache2::Const -compile => 'OK';
+use Apache2::RequestIO;
+use Apache2::RequestRec;

 sub handler {
     my $r = shift;
     $r->content_type('text/plain');

     $r->write("1..2\n");
-    $r->write("ok 1")
-    $r->write("not ok 2")
+    $r->write("ok 1");
+    $r->write("not ok 2");

     Apache2::Const::OK;
 }
 1;


-- 
Martín Ferrari
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.