Re: svn commit: r1067389 - in /httpd/apreq/trunk/glue/perl/lib/APR/Request: ./ Magic.pm
Fred Moyer <[email protected]> Fri, 4 Feb 2011 21:14:09 -0800
| Newsgroups | gmane.comp.apache.apreq |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Feb 4, 2011 at 9:04 PM, <[email protected]> wrote: > Author: joes > Date: Sat Feb =A05 05:04:58 2011 > New Revision: 1067389 > > URL: http://svn.apache.org/viewvc?rev=3D1067389&view=3Drev > Log: > class for writing apreq code portable across cgi/mp2 Is this for the issue Mark reported? =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm (added) > +++ httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm Sat Feb =A05 05:= 04:58 2011 > @@ -0,0 +1,18 @@ > +package APR::Request::Magic; > +require base; > +eval { require APR::Request::Apache2; }; > +if ($@) { > + =A0 =A0require APR::Request::CGI; > + =A0 =A0require APR::Pool; > + =A0 =A0base->import("APR::Pool"); > + =A0 =A0*handle =3D *APR::Request::CGI::handle; > + =A0 =A0*new =3D sub { bless APR::Pool->new, shift; }; > + =A0 =A0return 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 =3D *APR::Request::Apache2::handle; > +*new =3D sub { bless Apache2::RequestUtil->request, shift; } > + > +1; > > Propchange: httpd/apreq/trunk/glue/perl/lib/APR/Request/Magic.pm > -------------------------------------------------------------------------= ----- > =A0 =A0svn:eol-style =3D native > > >