> -----Original Message-----
> From: Pierre J. Nicolas [mailto:[EMAIL PROTECTED]]
> Sent: Friday, May 05, 2000 10:00 AM
> To: [EMAIL PROTECTED]
> Subject: Newbie Question -
> 
> 
> Good Morning,
> 
> I just started using mod_perl, I'm still using the CGI.pm 
> module, but I
> plan
> to convert.  I've loaded the Apache::Registry and I'm experiencing a
> strange
> problem.
> 
> I have this snippet:
> 
>        print "Content-Type: text/html\n\n";
>        print_template(file_handle, *file_handle_ref) {
>                              open file_handle()
>                              while (file_handle()) {
>                                        manipulate current_line
>                                        print file_handle_ref
> current_line
>                               }
>        }
> 
> where "*file_handle_ref" could be a reference to STDOUT,
> this snippet worked fine, but now it stopped working, instead
> I get the message "The document contained no data"

mod_perl overrides the perl print() function - print()ing to STDOUT
explititly will not work.
just use print() if you can...

you might want to look at perl.apache.org/guide to help you get started with
mod_perl, specifically
http://perl.apache.org/guide/porting.html#STDIN_STDOUT_and_STDERR_streams


> 
> Also in my location tag  I also have the directive 
> "PerlSendHearder On"

you'll want to keep that On unless you are using the mod_perl API and
calling $r->send_http_headers yourself.

HTH

--Geoff

> however, when I remove that line all I get is the string 
> "Content-Type:
> text/html"
> displayed in the browser.
> 
> Thanks,
> 
> Pierre
> 

Reply via email to