Hi Dileep,
"Dileep Eduri" <[EMAIL PROTECTED]> wrote...
>
> ...its printing the http headers as well. if I turn of
> http headers, then nothing is getting printed..weird !!!
Not weird at all. Read the CGI::Application docs -- you should never print
from a run-mode:
> Perl Module => First.pm
>
> package First ;
> use strict;
> use base 'CGI::Application';
> use CGI::Application::Plugin::Apache qw(:all);
>
> sub mode1_sub {
>
> my $self = shift;
> my $req = $self->query();
> $req->content_type( 'text/html' );
> $req->send_http_header;
>
> my $var = "Hello!!! Its Working <br />";
> $req->print( $var );
> }
Thats print should be a return() instead. Let CGI:Application print it!
Otherwise you break all of C::A's header processing (such as cookies and
redirection) and output plugins like Gzip Compression, etc.
-dave