Reputation: 9544
Ok, so I am trying to set up a Dispatcher with mod_perl and I don't really know what I am doing wrong. I am fairly positive that the issue is with my mod_perl configuration. Here is what I think is relevant:
Apache Directory Config
<Directory "C:/Documents and Settings/frew/My Documents/acd">
SetHandler perl-script
PerlHandler ACD::Dispatch
Options Indexes FollowSymLinks ExecCGI
AllowOverride None
Order allow,deny
Allow from all
DirectoryIndex Default.html
</Directory>
Note: ACD::Dispatch is in acd/ACD.
ACD::Dispatch
package ACD::Dispatch;
use base 'CGI::Application::Dispatch';
sub dispatch_args {
return {
prefix => 'ACD',
table => [
'' => { app => 'Controller', rm => 'awesome' },
':app/:rm' => { },
],
};
}
And probably most importantly, the Apache errors:
[Mon Jan 12 17:42:08 2009] [error] [client 10.6.1.73] failed to resolve handler `ACD::Dispatch': Can't locate ACD/Dispatch.pm in @INC (@INC contains: C:/usr/site/lib C:/usr/lib . C:/Program Files/Apache Software Foundation/Apache2.2) at (eval 3) line 3.\n
Thanks for any help!
Update: I needed to add this to my Apache config:
<Perl>
use lib '/path/to/acd';
</Perl>
Upvotes: 2
Views: 1079
Reputation: 110429
Well, based on the error message:
ACD::Dispatch: Can't locate ACD/Dispatch.pm in @INC (@INC contains: C:/usr/site/lib C:/usr/lib . C:/Program Files/Apache Software Foundation/Apache2.2
and the fact that you said:
ACD::Dispatch is in acd/ACD.
It looks like you need to put the "acd" directory in the @INC path, using its absolute pathname.
Although you might think '.' is on @INC and that should be your acd
directory, I don't that that it is, under mod_perl. See, for example, this discussion.
Upvotes: 4