On Sat, 2002-09-28 at 00:51, Doug MacEachern wrote:
> On 28 Sep 2002, Philippe M. Chiasson wrote:
>  
> > Just grabbed the tarball and it tested fine with httpd 2.0.42/leader and
> > [EMAIL PROTECTED](testing with more in a moment)
> 
> could be the perl version, 5.8.0 tested fine for me.  the breakage 
> happened when using 5.6.1.
>  
> > what does httpd.conf look like around line 219 and why is it pod related
> > ? My httpd.conf has the pod stuff around line 360...
> 
> <Location /TestDirective::pod>
>     PerlSetVar TestDirective__pod_over_worked yes
>     PerlSetVar TestDirective__pod_cut_worked yes
>     =pod 
>     =cut 
>     This is some pod data
>     This is some more pod
>     =over apache
>     =back 
>     PerlResponseHandler TestDirective::pod
>     SetHandler modperl
> </Location>
> 


Got it! it's list_to_hash_of_lists from 
Apache-Test/lib/Apache/TestConfigPerl.pm's fault ;-p

I didn't know this, but if a test module adds configuration after an 
__END__ token, its quite heavily parsed and mangled before being
included in t/conf/httpd.conf

Big problem is that list_to_hash_of_lists doesn't preserve any ordering,
converting all the directives for one section into a hash (unordered of
course), so the exact order you will get those pod directives written 
in that config file is hash-order dependant.... Not a very good or 
predictable thing I guess

(BTW, is mod_perl the only module that has order requirements with it's
directives?)

Following patch fixes this by moving the configuration to test pod 
stuff back into lib/ModPerl/TestRun.pm. I'll try and see what I can do 
about that ordering issue in Apache::Test more generally when I have 2 
minutes.

Good night.


Index: lib/ModPerl/TestRun.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/ModPerl/TestRun.pm,v
retrieving revision 1.3
diff -u -b -B -r1.3 TestRun.pm
--- lib/ModPerl/TestRun.pm      27 Aug 2002 04:31:55 -0000      1.3
+++ lib/ModPerl/TestRun.pm      27 Sep 2002 18:16:41 -0000
@@ -47,6 +47,19 @@
     MyOtherTest value
 </Location>
 EOF
+
+    #XXX: this should only be done for the modperl-2.0 tests
+    $self->postamble(<<'EOF');
+=pod
+This is some pod data
+=over apache
+PerlSetVar TestDirective__pod_over_worked yes
+=back
+This is some more pod
+=cut
+PerlSetVar TestDirective__pod_cut_worked yes
+EOF
+    
 }
 
 1;

Index: t/response/TestDirective/pod.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/t/response/TestDirective/pod.pm,v
retrieving revision 1.1
diff -u -b -B -r1.1 pod.pm
--- t/response/TestDirective/pod.pm     17 Sep 2002 02:37:44 -0000      1.1
+++ t/response/TestDirective/pod.pm     27 Sep 2002 18:16:43 -0000
@@ -22,16 +22,3 @@
 }
 
 1;
-__END__
-=pod
-This is some pod data
-
-=over apache
-PerlSetVar TestDirective__pod_over_worked yes
-=back
-
-This is some more pod
-
-=cut
-
-PerlSetVar TestDirective__pod_cut_worked yes



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to