httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Winstead <j...@trainedmonkey.com>
Subject Re: Request singleton
Date Tue, 19 Dec 2000 01:17:12 GMT
you forgot the part of the patch that updates the documentation. :)

(this also doesn't allow setting POST_MAX or DISABLE_UPLOADS. and
what happens on a subrequest?)

i'm going to hold off on including this for now until we can nail
these things down.

jim

On Dec 18, Matt Sergeant wrote:
> OK, here's my (untested) attempt at making Apache::Request a singleton via
> pnotes. Comments welcome.
> 
> Call syntax is just:
> 
> my $req = Apache::Request->instance($r);
> 
> Index: Request.pm
> ===================================================================
> RCS file: /home/cvs/httpd-apreq/Request/Request.pm,v
> retrieving revision 1.8
> diff -r1.8 Request.pm
> 28a29,39
> > sub instance {
> >     my $class = shift;
> >     my $r = shift;
> >     if (my $apreq = $r->pnotes('apreq')) {
> >         return $apreq;
> >     }
> >     my $new_req = $class->new($r);
> >     $r->pnotes('apreq', $new_req);
> >     return $new_req;
> > }

Mime
View raw message