[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cgiapp] Combining CGI::App::Plugin::Apache and CGI::App::Dispatch


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


#####  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/                 ##
##                                                            ##
################################################################


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.