I'm trying to play around with CGI::Application::Dispatch a bit and I'm
having some trouble getting it working and I'm hoping someone who has
experience with this module can offer some advice.
I have subclassed CGI::Application::Dispatch as follows:
package MyDispatch;
use base 'CGI::Application::Dispatch';
sub dispatch_args {
return {
prefix = 'public::Packages',
table = [
''= { app = 'PublicSite', rm =
'Content' },
],
}
};
}
1;
In my Apache config I have:
Alias /dispatchperl /home/user/dev_html/perl/
Location /dispatchperl
SetHandler perl-script
PerlHandler MyDispatch
/Location
When I attempt to hit the URI /dispatchperl, my module seems to be
getting invoked. But I get the following error:
[Tue Apr 27 11:58:35 2010] -e: [Dispatch] ERROR for request
'/dispatchperl/': Can't locate object method new via package
public::Packages::PublicSite at
/usr/lib/perl5/site_perl/5.8.8/CGI/Application/Dispatch.pm line 702.
[Tue Apr 27 11:58:35 2010] -e:
I am able to run that module with a standard instance script just fine:
use PublicSite;
local our $app = PublicSite-new();
$app-run();
# CGI::Application community mailing list
####
## To unsubscribe, or change your message delivery options, ##
## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp##
####
## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ##
## Wiki: http://cgiapp.erlbaum.net/ ##
####