heddy Boubaker ([EMAIL PROTECTED]) said something to this effect:
> 
>  <> "Darren" == darren chamberlain <[EMAIL PROTECTED]> writes:
> 
>  Darren> Apache::Request retrieves the POSTed content, so if you try to get
>  Darren> it, the server will hang, waiting for input. With Apache::Request,
>  Darren> just call the
>  Darren> $r->param method to fetch the data, and don't try to call it yourself.
> 
>  Yes I know that, I didn't try to read something (POST data from stdin) I try
>  to write (print to stdout). BTW my code act the same if I use Apache::Request
>  or not... And I forgot to say that I use CGI module in my handler, and that
>  no other handler eat r->content ...

But using CGI's methods invoke CGI's self_or_default meethod, which will
either use the object passed in or create one internally ($Q) and use that
to perform its output. So, even though you are not explicitly creating a CGI
object, you are creating one implicitly, which is what is grabbing the
POSTed data, which is why the script hangs right where you first try to
use a CGI method.

If you need the HTML generation methods (it looks like this
is all you use CGI for), look into HTML::StickyForm for the forms, and 
extend it with your own package for other HTML elements, or use a templating
system like HTML::Template or TemplateToolkit. I prefer to use
HTML::Template, or HTML::Mason when possible, for exactly this reason.
Another option, of course, is to use CGI in an object oriented fashion,
and preload it with -compile to have the entirety of it reside in the parent
process.

Recommendation: Abondon CGI, and go with Apache::Request (or
Apache::RequestNote), HTML::StickyForm, and HTML::Template.

(darren)

-- 
The goal of technology is to build something that will last at least until
we finish building it.

Reply via email to