Philippe M. Chiasson wrote:


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.

Hmm, and where do you get this $filter object from? Do you have a working example?



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

--
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to