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;
> }
>
--
<Matt/>
/|| ** Director and CTO **
//|| ** AxKit.com Ltd ** ** XML Application Serving **
// || ** http://axkit.org ** ** XSLT, XPathScript, XSP **
// \\| // ** Personal Web Site: http://sergeant.org/ **
\\//
//\\
// \\