On Fri, 3 May 2002 [EMAIL PROTECTED] wrote:
>
> 3. There are times when one may need to output data to the browser, at several
> points throughout the life of a CGI/mod_perl app.  What if we're about to do a
> long database query?  For this, maybe we'd want to output occasional status
> messages.  CGI::Application currently offers an excellent mechanism for keeping
> code clean, by having you return, as a string, the HTML you want delivered to
> the browser.  In a case where this behaviour may not be desired though, what
> are the thoughts on being able to return undef, instead of HTML.  Perhaps undef
> could signal CGI::Application that headers and HTML have already been sent.

I ran into this particular issue when I wanted to return some unbuffered
output from within the CGI::App framework. The solution is easy enough:

1. Turn on unbuffered IO.
2. Send headers and output to the browser.
3. "exit" manually instead of returning.

To do that sort of thing most of the time would be to work against the
CGI::App system in my opinion. However, for the rare case where it's
desired, it's a more straightforward solution to me then learning some
new API to do something that's already easy.

  -mark

http://mark.stosberg.com/


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

Reply via email to