rhumbliner has asked for the wisdom of the Perl Monks concerning the following question:

I'm using a Perl script with Apache and mod_perl to generate dynamic responses to client requests. At times I would like to signal Apache that my response is complete so the client can begin processing the response while on the server I perform a bunch of other clean up tasks. My code looks like this
use CGI::Simple; my $q = new CGI::Simple; print $q->header(%HTTP_HEADERS); print $html; # response complete ... continue with various tasks ...

Replies are listed 'Best First'.
Re: Signal Apache that Response is Complete
by hippo (Archbishop) on Nov 02, 2024 at 11:43 UTC
    while on the server I perform a bunch of other clean up tasks.

    Sounds like a job for PerlCleanupHandler.


    🦛