On Fri, Feb 4, 2011 at 9:04 PM, <j...@apache.org> wrote: > 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
Is this for the issue Mark reported? ============================================================================== > --- 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; On my initial read I missed the return statement, so it might be a bit easier to grok with this block in an 'else' section. This looks good though - exactly towards the Apache2::APR decoupling that I think we need to go in mod_perl land. > +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 > > >