Splitting a Catalyst App and recombining it with Plack::Builder
I had a big Catalyst App serving HTML.
Some time later a RESTful interface was needed so I added RESTful controllers using Catalyst::Controller::REST
But that broke Plack::Middleware::CSRFBlock, because the REST calls don't request a form and thus cannot add the secure token to POST requests.
Thinking about a solution it dawned on my that having a single App serving HTML and RESTful requests is probably a bad design choice.
Thankfully most of my business logic is in my DBIx::Class schema so splitting up one Catalyst App into two Catalyst Apps under the same nam…