Permalink
Browse files

simpler

git-svn-id: https://svn.apache.org/repos/asf/httpd/apreq/trunk@1067403 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
1 parent 89b27cb commit 9f81b23572f1465db4070a7def1a1d9c236cb3d9 Joe Schaefer committed Feb 5, 2011
Showing with 6 additions and 7 deletions.
  1. +6 −7 glue/perl/lib/APR/Request/Magic.pm
@@ -6,16 +6,14 @@ if ($@) {
require APR::Request::CGI;
require APR::Pool;
base->import("APR::Pool");
- *handle = sub { APR::Request::CGI->handle(@_) };
- *new = sub { $ctx ||= bless APR::Pool->new, shift; return $ctx };
+ *handle = sub { $ctx ||= bless APR::Pool->new; APR::Request::CGI->handle($ctx, @_) };
our $MODE = "CGI";
}
else {
require Apache2::RequestRec;
require Apache2::RequestUtil;
base->import("Apache2::RequestRec");
- *handle = sub { APR::Request::Apache2->handle(@_) };
- *new = sub { bless Apache2::RequestUtil->request, shift };
+ *handle = sub { APR::Request::Apache2->handle(Apache2::RequestUtil->request, @_) };
our $MODE = "Apache2";
}
@@ -33,6 +31,7 @@ else {
#
# use APR::Request::Magic;
#
-# my $apreq_ctx = APR::Request::Magic->new;
-# my $apreq_handle = $apreq_ctx->handle(@typical_args_without_the_first_one);
-# # do stuff with $apreq_handle which is an APR::Request object
+# my $apreq = APR::Request::Magic->handle(@typical_args_sans_the_first_one);
+# # do stuff with $apreq which is an APR::Request object
+#
+# 3) Be sure PerlOptions +GlobalRequest is set for mp2.

0 comments on commit 9f81b23

Please sign in to comment.