好的,所以我正在尝试使用 mod_perl 设置 Dispatcher,但我真的不知道我做错了什么。我相当肯定问题出在我的 mod_perl 配置上。以下是我认为相关的内容:
Apache 目录配置
<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>
注意: ACD::Dispatch 在 acd/ACD 中。
ACD::调度
package ACD::Dispatch;
use base 'CGI::Application::Dispatch';
sub dispatch_args {
return {
prefix => 'ACD',
table => [
'' => { app => 'Controller', rm => 'awesome' },
':app/:rm' => { },
],
};
}
可能最重要的是,Apache 错误:
[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
谢谢你的帮助!
更新:我需要将此添加到我的 Apache 配置中:
<Perl>
use lib '/path/to/acd';
</Perl>