perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colin Wetherbee <...@denterprises.org>
Subject Re: [mp2] The right way to use CGI parameters in a handler
Date Mon, 11 Jun 2007 20:48:31 GMT
Jonathan Vanasco wrote:
>> As I said in my original post, I tried to use Apache2::Request, but 
>> after creating that object, I couldn't print anything anymore.  
>> Perhaps someone could give me a hint on how to implement it?
> 
> could you print beforehand?
> 
> 'print' might not be tied to the same output.

Printing beforehand wouldn't allow me to use the CGI parameters to 
determine the output. :)

> this might not be right based on your compile.
>>>>     print 'foo: ' . $cgi->param('foo') . "<br />\n";
> 
> try:
>     $r->print( 'foo: ' . $cgi->param('foo') . "<br />\n" );

No dice.

# BEGIN CODE BLOCK
   my $req = Apache2::Request->new($r);

   $r->content_type('text/html');
   $r->print("test<br />\n");
# END CODE BLOCK

The content-type doesn't even show up in this case.

If I put the $r->content_type() and $r->print() before the $req object 
is created, *still* nothing shows up.

Colin

Mime
View raw message