Hi,

I'm trying to write a handler for mod_perl 2.0.

I have a sub of the form

sub handler {
  my $r = shift;
  my $req = Apache2::Request->new($r);
  print "Something.";
  return Apache2::Const::OK();
}

When I go to the URL associated with the handler, I get a blank page,
nothing in the error log.

However, if I remove the "my $req = Apache2::Request->new($r);" line, it
prints out 'Something.' as it is supposed to.

I tried using Data::Dumper to dump $r, and it is an Apache2::RequestRec
object as it is supposed to be:
$VAR1 = bless( do{\(my $o = 10005704)}, 'Apache2::RequestRec' );

Even if I put a 'die' statement after the Apache2::Request->new call, the
program doesn't die, it just returns a blank page. It seems to be some sort
of silent failure within the new() method of Apache2::Request, but I have no
idea of how to debug this.

I'm using the binaries of Apache2, mod_perl, etc. provided by Debian etch:
ii  apache2                                2.2.3-4
ii  libapache2-mod-apreq2             2.08-4
ii  libapache2-mod-perl2              2.0.2-2.4

Any ideas on what I can do?

TIA,
Eric

Reply via email to