Custom response problem

John Dunlap <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <CAC5eUSv=OM=ET4sdYObC4Zzt8keNBR9n5wK77_kF3hdNm3vfew@mail.gmail.com>
I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now
encountering a problem that I haven't seen before. My apache version
is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I
have an installation problem of some kind but I'm not sure where to look
for problems. My application works correctly until I attempt to define a
custom response, as follows,

sub handler {
my $apache = shift;
$apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi
mom');
return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
}

I see a 500 error, which is what I want, when I access the page. However
the error page is the default apache 500 error response page and I want to
override it. When I look in the logs, I see this:

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object
method "custom_response" via package "Apache2::RequestRec" at
/usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm
line 41.

This would imply, at least to me, that this method is not compiled into
mod_perl or perhaps into apache itself but I cannot be sure. Any
suggestions?

Cheers!
John
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.