httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moyer <f...@redhotpenguin.com>
Subject Re: svn commit: r1067389 - in /httpd/apreq/trunk/glue/perl/lib/APR/Request: ./ Magic.pm
Date Sat, 05 Feb 2011 05:14:09 GMT
On Fri, Feb 4, 2011 at 9:04 PM,  <joes@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
>
>
>

Mime
View raw message