[cgiapp] Combining CGI::App::Plugin::Apache and CGI::App::Dispatch
Ron Savage
ron at savage.net.au
Sun Jan 20 18:12:22 EST 2008
On Sun, 2008-01-20 at 17:13 -0500, Michael Peters wrote:
Hi Michael
Thanx for the response.
> > Is is possible to combine the 2 modules named in the Subject?
>
> Yes, but it depends on how you use them. Are you trying to use both of them as
> base classes? Dispatch is not intended to be used as a base class. Dispatch sits
> outside of your application modules and *dispatches* to them.
Yes, I'm trying to use them both as base classes, as in:
use base qw(CGI::Application CGI::Application::Dispatch);
'... not intended to be used as a base class'??????
Let me quote your Synopsis:
With a dispatch table
package MyApp::Dispatch;
use base 'CGI::Application::Dispatch';
No $customized_profanity wonder I'm confused :=).
The Synopsis goes on:
sub dispatch_args {
return {
prefix => 'MyApp',
table => [
'' => { app => 'Welcome', rm => 'start' },
':app/:rm' => { },
'admin/:app/:rm' => { prefix => 'MyApp::Admin' },
],
};
}
So, how will CGI::Application::Dispatch have access to dispatch_args() if that sub is inside my module?
Anyway, thanx for the pointers. I'll battle on while I breathlessly await your reply...
--
Ron Savage
ron at savage.net.au
http://savage.net.au/index.html
More information about the cgiapp
mailing list