[cgiapp] Combining CGI::App::Plugin::Apache and CGI::App::Dispatch
Michael Peters
mpeters at plusthree.com
Mon Jan 21 09:33:20 EST 2008
Ron Savage wrote:
> 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 :=).
You can subclass Dispatch. That's not a problem. I do it all the time. But you
subclass it to create a custom dispatch module, not an application module. For
that you subclass C::A itself. Remember, Dispatch sits outside of your
application modules and dispatches to them. The prime use case is when you have
lots of application modules. For instance, Smolder has 11 application modules
(which inherit from C::A) and 1 dispatch module (which inherits from Dispatch).
--
Michael Peters
Developer
Plus Three, LP
More information about the cgiapp
mailing list