in reply to mod_perl HTTP input request

Welcome to Perl! You are at the start of a fascinating journey, which will have its ups and downs, but will never be without interest.

As to your question: the answer is "YES". mod_perl allows you to have access to each of Apache's HTTP Request Cycle Phases by writing a specific PerlResponseHandler. I'm not saying it will be trivially easy to do so as Apache is a complicated piece of software, but at least mod_perl makes difficult things possible.

Thoroughly read the mod_perl documentation and check the wealth of Apache modules at CPAN. It is unlikely you will find one module which exactly solves all your problems in one go, but at least you can take some inspiration from their code and brew your own.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James