Hello,

Have there been any patches arround to build MasonX::WebApp compatible
with mod_perl2 ?


VERSIONS:
Server Version: Apache/2.2.0 (Unix)
                mod_ssl/2.2.0
                OpenSSL/0.9.7e
                mod_apreq2-20050712/2.1.3-dev ( libapreq2-2.06-dev )
                mod_perl/2.0.2
                Perl/v5.8.4

I have tried to replace references to Apache::Constants with
Apache2::Const as follows:
================================
--- MasonX-WebApp-0.11/lib/MasonX/WebApp.pm     2005-07-19 00:09:28.000000000 
-0400
+++ MasonX-WebApp-0.11.david/lib/MasonX/WebApp.pm       2006-01-25 
17:18:45.000000000 -0500
@@ -33,7 +33,9 @@

 use base 'Class::Data::Inheritable';

-use Apache::Constants ();
+use Apache2::Const  -compile => qw(:common) ;
+use Apache2::RequestRec ();
+use APR::Table;

 use Class::Factory::Util;
 use HTML::Mason::Interp;
@@ -259,11 +261,11 @@
         $r->method('GET');
         $r->headers_in->unset('Content-length');
         $r->err_header_out( Location => $uri );
-        $r->status( Apache::Constants::REDIRECT() );
+        $r->status( Apache2::Const::REDIRECT );

         $r->send_http_header;

-        $self->abort( Apache::Constants::REDIRECT() );
+        $self->abort( Apache2::Const::REDIRECT );
     }
 }

@@ -276,7 +278,7 @@
     my $status = shift;

     $self->{__aborted__} = 1;
-    $self->{__abort_status__} = defined $status ? $status : 
Apache::Constants::OK();
+    $self->{__abort_status__} = defined $status ? $status : Apache2::Const::OK 
;

     abort_exception;
 }

===============================

and abort.t from the test suite...

===============================

--- MasonX-WebApp-0.11/t/abort.t        2005-07-19 00:09:28.000000000 -0400
+++ MasonX-WebApp-0.11.david/t/abort.t  2006-01-25 17:41:04.000000000 -0500
@@ -11,11 +11,9 @@
 sub Apache::perl_hook { 1 }
 sub Apache::server { 0 }

-use Apache::Constants ();
+# use Apache::Constants ();
 use MasonX::WebApp;

-sub Apache::Constants::OK { 200 }
-sub Apache::Constants::REDIRECT { 302 }

 {
     package Tie::STDOUT;
@@ -64,3 +62,7 @@
     is $app->abort_status, Apache::Constants::REDIRECT(), 'abort status is 
REDIRECT';
 }

+package Apache::Constants;
+
+sub Apache::Constants::OK { 200 }
+sub Apache::Constants::REDIRECT { 302 }

====================================

Unfortunately the modified lib does not test right:


[MasonX-WebApp-0.11.david]# perl Build.PL
Checking whether your kit is complete...
Looks good
Deleting Build
Removed previous script 'Build'
Creating new 'Build' script for 'MasonX-WebApp' version '0.11'

[MasonX-WebApp-0.11.david]# ./Build
lib/MasonX/WebApp.pm -> blib/lib/MasonX/WebApp.pm
Manifying blib/lib/MasonX/WebApp.pm -> blib/libdoc/MasonX::WebApp.3pm
[EMAIL PROTECTED] MasonX-WebApp-0.11.david]# ./Build test
t/abort..............NOK 3
#   Failed test 'abort status is OK'
#   in t/abort.t at line 39.
#          got: '0'
#     expected: '200'
t/abort..............ok 8/8# Looks like you failed 1 test of 8.
t/abort..............dubious
        Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 3
        Failed 1/8 tests, 87.50% okay
t/action.............ok
t/new................ok
t/session-wrapper....ok
Failed Test Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/abort.t      1   256     8    1  12.50%  3
Failed 1/4 test scripts, 75.00% okay. 1/18 subtests failed, 94.44% okay.





-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to