perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Himanshu <himanshu.g...@gmail.com>
Subject Why load two modules to call methods on the same object?
Date Wed, 17 Sep 2008 03:00:38 GMT
For the following to work I must load Apache2RequestRec as well as
Apache2::RequestIO.

package GS;
use Apache2::Const -compile => ':common';
use Apache2::RequestRec ();# $r->content_type
use Apache2::RequestIO ();   # $r->print

sub handler {
   my $r = shift;
   print $r->content_type('text/plain');
   print $r->print("hello, world");
   return Apache2::Const::OK;
}

1;

There must be a reason we have it this way. Any clues?

Thanks,
Himanshu

Mime
View raw message