On Tue, 11 Sep 2001, Stas Bekman wrote:
> Note that the following happens outside the normal modperl build, I just
> use Apache-Test framework, so it's possible that the problems happen,
> becase something is not loaded outside of modperl setup.
works fine here. my test was to hack in these changes:
--- t/response/TestAPI/request_rec.pm 2001/09/08 18:26:46 1.5
+++ t/response/TestAPI/request_rec.pm 2001/09/12 17:18:14
@@ -4,12 +4,12 @@
use warnings FATAL => 'all';
use Apache::Test;
-
+use Apache::compat ();
sub handler {
my $r = shift;
plan $r, tests => 37;
-
+ $r->send_http_header('text/html');
#Apache->request($r); #PerlOptions +GlobalRequest takes care
my $gr = Apache->request;
i get a header and content-type: text/html as-as and:
-if i add PerlOptions +ParseHeader (under Location /TestAPI::request_rec)
-if i change SetHandler to perl-script under the same location
> which for some reason gets cured with:
> use Apache::Log ();
you should need to do that regardless. it should probably be added to
Apache::compat though.
> And the final thing, I cannot get print() to work, only $r->print works. I
> see that quite a few handlers in tests just print, but I cannot figure out
> what's different in their code that makes plain print() work. I don't seem
> to be able to override it :(
STDOUT is only tied for you with SetHandler perl-script
> Uh, also what's the different between 'SetHandler perl-script' and
> 'SetHandler modperl'? I guess the former is for CGI scripts, but couldn't
> find any docs.
perl-script is like 1.x, sets up tied STDOUT, %ENV, deals with
PerlOptions +ParseHeaders, etc. SetHandler modperl does nothing but call
the handler routine.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]