[cgiapp] C::A::P::Routes

Michael Peters mpeters at plusthree.com
Wed Mar 3 18:18:30 EST 2010


On 03/03/2010 05:58 PM, P Kishor wrote:

> I do use CAD in another application, and yes, that works rather well.
> For a number of reasons, I want to explore CAPRoute. In fact, one
> thing I don't like about CAD is that it breaks the (to me) established
> formula of extending a CA application's functionality via a plugin.

In fact, there are lots of C::A related modules that aren't plugins:

CGI::Application::FastCGI
CGI::Application::PSGI
CGI::Application::Server

And you'll note that they're all concerned about what happens before 
your application module begins to do it's thing. Dispatch has to happen 
outside of your application module because it in fact picks which 
application module to run based on the URI.

> I
> don't want all that routing table stuff in my instance script. I want
> it in my App.pm, along with all the run modes.

This will only work in very simple situations where you only have a 
single application module. I try to not have more than a dozen run modes 
in any application file, and all but the simplest of applications will 
have more than that.

-- 
Michael Peters
Plus Three, LP


More information about the cgiapp mailing list