The patch below seems to work
--- 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
18:31:33.000000000 -0500
@@ -33,7 +33,7 @@
use base 'Class::Data::Inheritable';
-use Apache::Constants ();
+use Apache2::Const -compile => qw(HTTP_OK REDIRECT) ;
use Class::Factory::Util;
use HTML::Mason::Interp;
@@ -259,11 +259,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 );
}
}
@@ -275,8 +275,9 @@
my $self = shift;
my $status = shift;
+
$self->{__aborted__} = 1;
- $self->{__abort_status__} = defined $status ? $status :
Apache::Constants::OK();
+ $self->{__abort_status__} = defined $status ? $status :
Apache2::Const::HTTP_OK ;
abort_exception;
}
--- 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 }
-------------------------------------------------------
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