Dorian Taylor <[EMAIL PROTECTED]> writes:

> http://search.cpan.org/~dorian/ - now with working tests.
>
> 0.03 should show up soon (forgot to remove the bit about
> ap_save_brigade in 0.02)

Hmm, have you considered removing the _filter sub and writing 
it as a closure instead?  Here's some code that I've been using 
for that:

     use base "Apache2::Filter";
     ...
     my $content = "";
     $subr->add_output_filter(bless sub : FilterRequestHandler {
       my ($f, $bb) = @_;
       while (my $e = $bb->first) {
           $e->read(my $buf);
           $content .= $buf;
           $e->delete;
       }
       return Apache2::Const::OK;
     });

    $subr->run; # reads entire subrequest into $content

This way your subrequest buckets are all consumed by the filter,
and you don't need a pnote to store the captured subrequest 
(I really don't know why you want to use ap_save_brigade). IMO 
dynamically creating filters using closures is a really nifty 
feature of mod_perl2; I use it to postprocess stuff stored
inside a mod_authz_svn-protected subversion repository. Just *try* 
getting the authz info correct with a plain-old CGI script :-).

-- 
Joe Schaefer

Reply via email to