[Templates] Process method timing quandry...

Paul Seamons mail at seamons.com
Tue May 20 16:11:24 BST 2008


Under CGI or mod_perl1, you can accomplish this by setting the autoflush 
marker on STDOUT.  Either of these will do it.

local $| = 1;

OR

use IO::Handle;
STDOUT->autoflush;

If you are running under mod_perl2 you will need to get your apache request 
object and call ->rflush everytime you have data to send to the browser.

sub handler {
    my $r = shift;
    print_something();
    $r->rflush;

    print_something_else();
}

Paul 



More information about the templates mailing list