Geoffrey Young wrote:
Perrin Harkins wrote:
On Fri, 2004-08-13 at 11:06, Geoffrey Young wrote:
you can't do that with mod_perl 1.0 - you can $sub->run() but that result goes right to the client.
For comparison, how would you do this in mp2? With a filter?
pretty much. I believe that subrequests in apache2 have the same limitations as before wrt calling run(). but if the main reason you want to capture a subrequest is to post-process dynamic content then you can simply insert an output filter to do that for you, as that is what they were designed for.
Nah, you can do it in a much cleaner way in mp2.
See http://perl.apache.org/docs/2.0/api/Apache/SubRequest.html#C_lookup_uri_, but basically you can
my $data; my $subr = $r->lookup_uri($uri, $filter); $subr->run;
And $filter can be a very simple output filter that just stashes data as it comes out or anything else you feel like doing.
--Geoff
-- -------------------------------------------------------------------------------- Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5 http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5
signature.asc
Description: OpenPGP digital signature