httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r1067389 - in /httpd/apreq/trunk/glue/perl/lib/APR/Request: ./ Magic.pm
Date Sat, 05 Feb 2011 05:04:58 GMT
Author: joes
Date: Sat Feb  5 05:04:58 2011
New Revision: 1067389

URL: http://svn.apache.org/viewvc?rev=1067389&view=rev
Log:
class for writing apreq code portable across cgi/mp2

Added:
    httpd/apreq/trunk/glue/perl/lib/APR/Request/
    httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm   (with props)

Added: httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm
URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm?rev=1067389&view=auto
==============================================================================
--- httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm (added)
+++ httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm Sat Feb  5 05:04:58 2011
@@ -0,0 +1,18 @@
+package APR::Request::Magic;
+require base;
+eval { require APR::Request::Apache2; };
+if ($@) {
+    require APR::Request::CGI;
+    require APR::Pool;
+    base->import("APR::Pool");
+    *handle = *APR::Request::CGI::handle;
+    *new = sub { bless APR::Pool->new, shift; };
+    return 1;
+}
+require Apache2::RequestRec;
+require Apache2::RequestUtil;
+base->import("Apache2::RequestRec");
+*handle = *APR::Request::Apache2::handle;
+*new = sub { bless Apache2::RequestUtil->request, shift; }
+
+1;

Propchange: httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message