Is their already a Catalyst MVC (Perl) project template?
If not, is there going to be?
I've watched the ruby on rails screen-casts and would like to see the same ease of "build" stuff with Catalyst (being the rails equiv for Perl)
I'm thinking about making a big dive and switching from cli+vim+tab terms+pdb+h2xs+firebug development tools pattern to an IDE.
I've filed a feature request for this here:
http://bugs.activestate.com/show_bug.cgi?id=78410
However, none of us here are that familiar with Catalyst so it's unlikely that we'll be looking at this in the immediate future.
Perhaps someone in the Komodo community would like to take this up and post their efforts here? You can poke through the Rails and Zend project templates to see how framework commands are run from macros and how the project environment is set up (see Rails Tools/~Internal/rails_init in the Rails project template). I think some of the macros could even be re-purposed to run Catalyst commands.
I just began trying Komodo for my Catalyst projects, so I would be interested in anything along these lines also.
This may not apply to you, but if you are using Template Toolkit along with Catalyst, there is support for that already built into Komodo, however with 2 catches.
First, you'll have to associate your .tt2 files with the TemplateToolkit language in the preferences (no big deal).
Second, Komodo's HTML active syntax checker will hate you. It appears not to like dealing with files that only contain a portion of the HTML (will complain about not having a proper header, for instance) and also it seems not to understand TT2 tags in place of URLs in links, or inside certain blocks, such as tables, and things like that, so it marks each one with a warning line.
I'm new to Komodo myself, so perhaps there are ways to resolve this that I've yet to learn (or it's possibly not something that can be resolved with Komodo itself but requires modifications to the HTML checking engine used by Komodo).
Komodo does seem to have the potential of making Catalyst development pretty slick. If your experience working with Catalyst is like mine though, much of it really involves working with TT2 and DBIx, so anything to aid working with them makes the whole package that much better.
So I've done a little work to make this template "do able".
I'm really really new to writing macro's and the Javascript API documentation for Komodo IDE is a bit lacking...
I would like to build some Komodo commands to handle running the create scripts and test server, but I have no idea how I would create a command that would detect a project property (of some sort) that would allow the command to find the path of the script. The Catalyst project helper creates scripts (under the aptly named script directory) called myapp_create.pl myapp_server.pl etc.
The Komodo commands that would map to these scripts would have to reference a property in order to find their names being as the Komodo project name is not always the same as the Catalyst application namespace. Further more the catalyst.pl script builds the scripts with the application package name as lower case with :: converted to _ (underscores).
Another issue would be that the Komodo project file should really live in the same directory as the catalyst app!
It currently does this:
My::TestApp.kpf - My::TestApp - lib - root - script - my_testapp_create.pl - etc... - t - Changes - Makefile.pl - README - my_testapp.confIt should be my like this:
If there are anybody out there who could give a few pointers on how to accomplish this I would be more than happy to take on the mantle of building a komodo-catalyst-kit similar to what was done with Django.
I would probably even build and release a Perl ModuleMaker project template!
Here is an oncreate macro that takes care running the catalyst.pl crucible script:
var project = komodo.macro.project; var name = /^(.*?)(\.kpf)?$/(project.name)[1]; var catcmd = 'catalyst.pl'; var packnm = null; while(!packnm) { packnm = ko.dialogs.prompt(null,"Package Name: ",name,"Catalyst Application Package Name"); } var procmd = [catcmd,name,'{"cwd": "%p"}'].join(' ').toString(); ko.run.runEncodedCommand(window,catcmd, function (r) { if (r != 127) { ko.run.runEncodedCommand(window,procmd, function (r) { if (r == 0) { ko.dialogs.alert('Catalyst scaffold build!'); } else { ko.dialogs.alert('Something went wrong check "Command Output"'); } }); } else { ko.dialogs.alert('Unable to locate catalyst.pl in your path'); } });