Subject: | SVN::Web mod_perl2 patch |
I made some small changes to get SVN::Web running under mod_perl2 while
still keeping mod_perl compatibility, I hope it is useful to you.
Subject: | Web.pm.diff |
*** Web.old Sun Jan 29 17:26:25 2006
--- Web.pm Sun Jan 29 17:22:29 2006
***************
*** 860,874 ****
}
sub handler {
! eval "
! use Apache::RequestRec ();
! use Apache::RequestUtil ();
! use Apache::RequestIO ();
! use Apache::Response ();
! use Apache::Const;
! use Apache::Constants;
! use Apache::Request;
! ";
my $r = shift;
eval "$r = Apache::Request->new($r)";
--- 860,886 ----
}
sub handler {
! use mod_perl;
! use constant MP2 => $mod_perl::VERSION >= 1.99;
! BEGIN {
! if (MP2) {
! require Apache2::RequestRec;
! require Apache2::RequestUtil;
! require Apache2::RequestIO;
! require Apache2::Response;
! require Apache2::Request;
! require Apache2::Const;
! Apache2::Const->import(-compile => qw(OK DECLINED));
! } else {
! require Apache::RequestRec;
! require Apache::RequestUtil;
! require Apache::RequestIO;
! require Apache::Response;
! require Apache::Request;
! require Apache::Constants;
! Apache::Constants->import(-compile => qw(OK DECLINED));
! }
! }
my $r = shift;
eval "$r = Apache::Request->new($r)";
***************
*** 921,927 ****
}
mod_perl_output($cfg, $html);
! return &Apache::OK;
}
=head1 SEE ALSO
--- 933,939 ----
}
mod_perl_output($cfg, $html);
! return MP2 ? Apache2::Const::OK : Apache::Constants::OK;
}
=head1 SEE ALSO