Andrew Ho wrote: > Hans, > > HP>I'am new to the list, and i've been looking for a solution for > HP>buffering, in order to decide to make a redirect after the printing of > HP>HTML content. It seems that $| don't work fot this. > > Whether or not you have $| on, you will want to explicitly control whether > output is sent if you may want to do a redirect at some point in your > code. There are two simple ways to rearrange your code to do this from a > mod_perl handler or Apache::Registry scripts. > > The first is to determine what all the cases are where you would do a > redirect. Then put this code up front, before you output anything. > > The second method would be to organize your code so that instead of using > print or calling $r->print(), you accumulate your output into a variable. > At the end of your handler() or Apache::Registry script, you can either > redirect, or print the accumulated output. > > Humbly, > > Andrew > > ---------------------------------------------------------------------- > Andrew Ho http://www.tellme.com/ [EMAIL PROTECTED] > Engineer [EMAIL PROTECTED] Voice 650-930-9062 > Tellme Networks, Inc. 1-800-555-TELL Fax 650-930-9101 > ----------------------------------------------------------------------
Thank you Andrew I was already aware of the solutions you gave me, and it's comfortable to listen another programmer who seems exactly the same. I was expecting to find something new inside mod_perl to do the job. Actually i keep the redirection code in top of the application and it's not a clean solution. Put a wraper around the print statement seems the cleaner solution after all. I don't want to reinvent the wheel and finally decided to use Apache::ASP with it's buffering capabilities. Hans Poo
begin:vcard n:Poo;Hans tel;cell:09-3318955 tel;work:2327992 x-mozilla-html:FALSE url:www.namb.cl org:New Art Media & Business;System Administration adr:;;El Bosque Sur 77 Of.1 ;Santiago;RM;na;Chile version:2.1 email;internet:[EMAIL PROTECTED] x-mozilla-cpt:;0 fn:Hans Poo end:vcard