Re: Fwd: Multiple comp_root bug (extra ARG)

Marius Feraru <[email protected]> Mon, 05 Dec 2005 17:27:35 +0200
Newsgroups gmane.comp.web.mason.devel
Organization N0i.Net
Message-ID <[email protected]>
OK, I twisted H/M testing by plugging Apache::Test and setup my tests.
Result? All OK! :)

*blush* I'm quite puzzled, but it's clear for me now that I have to dig 
for it at some different layer :\

If I'm at this, I noticed the distro contains some useless files: t/data 
and t/logs. Adding more lines to MANIFEST.SKIP? ;-)

I attached a diff with my stuttering, could be useful for somebody.


thanks and sorry for wasting your time (too) :(
-- 
Marius Feraru
hm13101.patch (text/x-patch, 4.4 KB)
diff -urwP HTML-Mason-1.3101/Build.PL HTML-Mason-1.3101.ab/Build.PL
--- HTML-Mason-1.3101/Build.PL	2005-08-23 18:18:11.000000000 +0300
+++ HTML-Mason-1.3101.ab/Build.PL	2005-12-05 16:18:28.000000000 +0200
@@ -43,13 +43,17 @@
     $prereq{mod_perl} = 1.999022;
 }
 
-my $build = Mason::Build->new
+my $build_pkg = eval { require Apache::TestMB } ? 'Apache::TestMB'
+                                                : 'Module::Build';
+
+my $build = $build_pkg->new
   (
    module_name => 'HTML::Mason',
    requires    => \%prereq,
    build_requires => {
 		      'Test'          => 0,
 		      'Test::Builder' => 0,
+              'Apache::Test'  => '1.12',
 		     },
    license     => 'perl',
    create_makefile_pl => 'passthrough',
diff -urwP HTML-Mason-1.3101/MANIFEST HTML-Mason-1.3101.ab/MANIFEST
--- HTML-Mason-1.3101/MANIFEST	2005-08-23 18:18:14.000000000 +0300
+++ HTML-Mason-1.3101.ab/MANIFEST	2005-12-05 16:27:50.000000000 +0200
@@ -118,22 +118,8 @@
 t/comps/test_code_param
 t/comps/uc_escape
 t/conf/httpd.conf
-t/data/multiconf1/obj/109036483/autohandler_test.obj
-t/data/multiconf1/obj/109036483/foo.obj
-t/data/multiconf2/obj/109036483/foo.obj
-t/data/obj/2298725087/comps/abort_with_not_ok.obj
-t/data/obj/2298725087/comps/abort_with_ok.obj
-t/data/obj/2298725087/comps/basic.obj
-t/data/obj/2298725087/comps/cgi_dh/dhandler.obj
-t/data/obj/2298725087/comps/cgi_foo_param.obj
-t/data/obj/2298725087/comps/error_as_html.obj
-t/data/obj/2298725087/comps/foo/dhandler.obj
-t/data/obj/2298725087/comps/params.obj
-t/data/obj/2298725087/comps/print.obj
-t/data/obj/2298725087/comps/redirect.obj
 t/lib/Apache/test.pm
 t/live_server_lib.pl
-t/logs/error_log
 t/run_one_test
 t/run_tests
 t/single_test.pl
diff -urwP HTML-Mason-1.3101/MANIFEST.SKIP HTML-Mason-1.3101.ab/MANIFEST.SKIP
--- HTML-Mason-1.3101/MANIFEST.SKIP	2005-08-23 18:18:11.000000000 +0300
+++ HTML-Mason-1.3101.ab/MANIFEST.SKIP	2005-12-05 16:27:14.000000000 +0200
@@ -45,3 +45,6 @@
 
 ^pod2htm[di]\.\w+$
 
+# test data
+^t/data
+^t/logs
diff -urwP HTML-Mason-1.3101/t/081-ah.t HTML-Mason-1.3101.ab/t/081-ah.t
--- HTML-Mason-1.3101/t/081-ah.t	1970-01-01 02:00:00.000000000 +0200
+++ HTML-Mason-1.3101.ab/t/081-ah.t	2005-12-05 17:01:56.000000000 +0200
@@ -0,0 +1,17 @@
+#!/usr/bin/perl -w
+use strict;
+use Apache::Test;
+use Apache::TestRequest;
+use Apache::TestUtil;
+
+plan tests => 3, have_lwp;
+
+my $res1 = GET '/echo?a=1;b=2';
+ok t_cmp($res1->code, 200, 'HTTP_OK');
+my $con1 = $res1->content;
+
+my $res2 = GET '/shared_subdir/echo?a=1;b=2';
+ok t_cmp($res2->code, 200, 'HTTP_OK');
+my $con2 = $res2->content;
+
+ok t_cmp($con1, $con2, 'content matches');
diff -urwP HTML-Mason-1.3101/t/comps/echo HTML-Mason-1.3101.ab/t/comps/echo
--- HTML-Mason-1.3101/t/comps/echo	1970-01-01 02:00:00.000000000 +0200
+++ HTML-Mason-1.3101.ab/t/comps/echo	2005-12-05 16:56:22.000000000 +0200
@@ -0,0 +1,16 @@
+<%flags>
+	inherit => undef
+</%flags>
+<%once>
+	use Data::Dumper ();
+</%once>
+<%init>
+  local $Data::Dumper::Indent = 0;
+  local $Data::Dumper::Sortkeys = 1;
+  local $Data::Dumper::Terse = 1;
+
+  $m->clear_buffer;
+  $r->content_type('text/plain; charset=UTF-8');
+  $m->print(Data::Dumper::Dumper(\%ARGS));
+  $m->abort;
+</%init>
diff -urwP HTML-Mason-1.3101/t/comps/shared_subdir/echo HTML-Mason-1.3101.ab/t/comps/shared_subdir/echo
--- HTML-Mason-1.3101/t/comps/shared_subdir/echo	1970-01-01 02:00:00.000000000 +0200
+++ HTML-Mason-1.3101.ab/t/comps/shared_subdir/echo	2005-12-05 16:56:27.000000000 +0200
@@ -0,0 +1,16 @@
+<%flags>
+	inherit => undef
+</%flags>
+<%once>
+	use Data::Dumper ();
+</%once>
+<%init>
+  local $Data::Dumper::Indent = 0;
+  local $Data::Dumper::Sortkeys = 1;
+  local $Data::Dumper::Terse = 1;
+
+  $m->clear_buffer;
+  $r->content_type('text/plain; charset=UTF-8');
+  $m->print(Data::Dumper::Dumper(\%ARGS));
+  $m->abort;
+</%init>
diff -urwP HTML-Mason-1.3101/t/conf/extra.conf.in HTML-Mason-1.3101.ab/t/conf/extra.conf.in
--- HTML-Mason-1.3101/t/conf/extra.conf.in	1970-01-01 02:00:00.000000000 +0200
+++ HTML-Mason-1.3101.ab/t/conf/extra.conf.in	2005-12-05 16:53:32.000000000 +0200
@@ -0,0 +1,9 @@
+PerlAddVar  MasonCompRoot  "main   => @DocumentRoot@"
+PerlAddVar  MasonCompRoot  "shared => @ServerRoot@/comps"
+PerlSetVar  MasonDataDir   "@ServerRoot@/data"
+PerlSetVar  MasonArgsMethod mod_perl
+
+<Location />
+  SetHandler perl-script
+  PerlHandler HTML::Mason::ApacheHandler
+</Location>
Only in HTML-Mason-1.3101/t/conf: httpd.conf
Only in HTML-Mason-1.3101/t: data
Only in HTML-Mason-1.3101/t: logs
smime.p7s (application/x-pkcs7-signature, 3.1 KB) - not displayed