[cgiapp] Location not found with CGI::Application::Dispatch under mod_perl V 2

Joshua Miller unrtst at gmail.com
Mon Sep 1 14:17:02 EDT 2008


On Mon, Sep 1, 2008 at 1:11 AM, Ron Savage <ron at savage.net.au> wrote:

>
> (2) startup.pl:
> use lib '/home/ron/perl.modules/Local-Sites/lib';
>
... etc ...


> (3) httpd.conf:
> PerlPostConfigRequire /home/ron/httpd/prefork/conf/startup.pl
>

So, after all the config has loaded, startup.pl will load, which is the only
place that sets your custom PERL5LIB path.


>
> <Location /local>
>        SetHandler perl-script
>        PerlResponseHandler CGI::Application::Dispatch
>        PerlSetVar CGIAPP_DISPATCH_PREFIX Local
> </Location>
>

This is part of the config, so I believe it will load prior to startup.pl
(because you're loading it in PerlPostConfigRequire).
Above the PerlResponseHandler line, add the line:
PerlSetVar PERL5LIB "/home/ron/perl.modules/Local-Sites/lib"

I haven't used CAP::Dispatch, but this looks like it has nothing to do with
that, and everything to do with path setup. I think you'll find the above
fixes it. That's because CAP::Dispatch gets pulled in before the startup.pl
(which sets lib), so it has no idea of your custom lib directory. Setting
PERL5LIB prior to including the CAP::Dispatch module should do the trick.

Best of luck,
--
Josh I.


More information about the cgiapp mailing list