Re: [htmltmpl] Executing code after print $template->output
Brought to you by:
samtregar
From: Todd <htm...@ch...> - 2004-05-10 17:40:04
|
Trying closing STDOUT after the call to output. -Todd On Mon, May 10, 2004 at 05:38:45PM +0200, John wrote: > Hi everyone > > BACKGROUND > > I'm using H::T with mod_perl and want to run some slow (several seconds) > of code at the end of a script, and after the user receives his HTTP > response. > > I have tried doing the following: > > print $template->output; > $r->register_cleanup(\&some_stuff); > > > sub some_stuff() { > sleep 10; #for example > } > > Expecting to receive the template page while the sub routine > "some_stuff" does its thing. > > However, H:T seems to wait till "some_stuff" finishes before going to > work. > > AND NOW THE QUESTION(S) > > So is there any way of getting H::T to get to work before the script > calling the ->output method finishes ? > > What exactly does H::T wait for before swapping the tags anyway ? > > An alternative (and maybe off topic) question would be, if H::T must > wait till the script calling the output method finishes before > executing, does anyone know of a way to get the results I am looking for > without forking ? > > Cheers > > John > > --- > Outgoing mail is certified Virus Free. > Checked by AVG anti-virus system (http://www.grisoft.com). > Version: 6.0.680 / Virus Database: 442 - Release Date: 09/05/2004 > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Sleepycat Software > Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to > deliver higher performing products faster, at low TCO. > http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3 > _______________________________________________ > Html-template-users mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/html-template-users |