httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: cvs commit: httpd-apreq-2/build xsbuilder.pl
Date Fri, 31 Oct 2003 18:01:57 GMT
Joe Schaefer wrote:

>>- make an Apreq::Base, consisting of a Base.xs that just
>>made available apr_initialize() and apr_terminate2().
>>- make an Apreq::Request which loads Apreq::Base and has
>>a new() method to create an Apreq::Request object by
>>    - calling apr_initialize()
>>    - creating a $p = APR::Pool->new()
>>    - creating a $req = Apache::Request->new($p, @_)
>>- make an Apreq::Cookie which similarly passes a $p pool
>>in as the $env within Apache/Cookie.pm.
>>- I'm not sure about this, but I also made a DESTROY sub
>>which calls apr_terminate2().
> 
> 
> initialize/terminate are per-process events, so calling them
> from the object ctor/dtor is probably a mistake.  IMO those calls
> probably belong inside BEGIN and END blocks within APR.pm.
> If that were so, Base.xs would be unnecessary, right?

s/BEGIN/BOOT/ and APR.pm does that already:

xs/APR/APR/APR.xs:

MODULE = APR    PACKAGE = APR

PROTOTYPES: disable

BOOT:
     file = file; /* -Wall */
     APR_initialize();
     extra_apr_init();

void
END()

     CODE:
     APR_terminate();


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Mime
View raw message