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

In reply to Apache/mod_perl2 : "failed to resolve handler" by jpeg

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.