The first version of the module to generate CRUDdy controllers automatically is up on my github. It’s for REST first. RPC comes next. It doesn’t use the normal syntax of calls to Catalyst::Helper (e.g., myapp_create.pl)–or, rather, it uses the normal syntax differently. When you type
$ catalyst.pl myapp $ cd myapp $ script/myapp_create.pl controller API::REST DBIC::API::REST myapp
Instead of you naming the specific controller you want to create, as usual, you just write
API::REST. The module loads your schema from the name of your app, e.g.,
myapp, and makes all your controllers in lib/myapp/Controller/API/REST/.
This module is incomplete. It remains to basically fill in the template to supply a whole
__PACKAGE__->config(...). I also need to write out the lib/myapp/Controller/API.pm and the lib/myapp/Controller/API/REST.pm, in order to supply the base of the chain all the result-class controllers use. I think I’ll release this one to CPAN when I’m done, cause this one is independent, unlike the moosified branch of Loader.
Any and all feedback welcome. Hit me up on IRC (amiri).
SPEAK / ADD YOUR COMMENT
Comments are moderated.