Monks, I'm humbled to come to you with a typical Friday afternoon/Monday morning problem. I'm trying to move into mod_perl and was looking at modperl's docs/user/config/config.pod, which gave me the following example:
This is almost certainly a stupid configuration issue. In httpd.conf I have
....
PerlSwitches -wT
PerlSwitches -I/usr/local/apache2 -I/usr/local/apache2/pl
and later:
PerlModule pl::Hello
<Location /hello>
SetHandler modperl
PerlResponseHandler pl::Hello
</Location>
in /usr/local/apace2/pl I have Hello.pm.
So when I issue a request for http://localhost/hello
I get a blank page and the error log says:
failed to resolve handler pl::Hello
I've tried changing the PerlModule and PerlResponseHandler lines to Hello (same result, even when moving Hello.pm to site_perl) and pl/Hello (different error entirely).
I have a traditional cgi that does a foreach my $i (@INC) {print $i} and /usr/local/apache2 and /usr/local/apache2/pl are not present. On the other hand, when I changed the PerlModule and PerlResponseHandler lines to refer to Hello.pm, apache barfs with this error:
error Can't locate pl::Hellopm in @INC (@INC contains:
/usr/local/apache2 /usr/local/apache2/pl /usr/lib/perl5/5.8.6/i486-linux /usr/lib/perl5/5.8.6 ...(truncated)
So what is incorrect with the above syntax? Is that not how I specify my own handlers? Am I missing some directives?
What is the difference between the modperl and perl-script SetHandler options?
Thanks for your patience.
--
jpg