perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Harrison" <c...@austin.rr.com>
Subject ModPerl
Date Fri, 30 Dec 2005 21:04:20 GMT
How come in ModPerl 2, we don't have to send the http headers and print
versus $r->print()  compared to ModPerl1 ?

 

 

 

## ModPerl 2

 sub handler {

      my $r = shift;

      $r->content_type('text/plain');

      print "mod_perl 2.0 rocks!\n";

      return Apache2::Const::OK;

  }

 

 

 

## ModPerl 1

 sub handler {

   my $r = shift;

   $r->send_http_header('text/plain');

   $r->print("mod_perl rules!\n");

   return OK;

  }

 

 

 

Cure


Mime
View raw message