Looking at the CGI::Application code, it appears that a debugging mechanism already in place may be of use to you:

# Send output to browser (unless we're in serious debug mode!)
unless ($ENV{CGI_APP_RETURN_ONLY}) {
print $output;
}
# clean up operations
$self->teardown();

return $output;

(line 158+ in version 2.6)
You could overload run(), set the env variable, call SUPER::run() and grab the output, filter it, or delay printing for stdout for later. Note that this is the only print in the entire module. This seems programmatically more clean than cutting your program short at 'exit' and luckily doesn't require any changes to the standard CGI::App code. Good luck!

On Tuesday, November 26, 2002, at 09:38 AM, Vroom, Tim wrote:

Hi,

I've got an existing CGI::Application that is running fine standalone. Now
however it needs to be incorporated
into a site as a slimmed down plug in. I think the simplest way to do this
will be to slim down the HTML Templates and the put the code for the Perl
script into the module code. The code will then run code from
the module and grab the necessary templates. In order for this to work I
need to prevent the CGI::header
from printing automatically.

What's the best way to do this?


Tim Vroom
GIS Internet Applications Developer
Northrop Grumman IT
201 Market Ave SW
Grand Rapids, MI 49503
Phone: 616-456-4524
[EMAIL PROTECTED]


><><><><><><><><><
AgentM
[EMAIL PROTECTED]



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/cgiapp@lists.erlbaum.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to