Below are the currently agreed-upon development practices for writing MojoMojo code. Discussion are welcome at discussion.
In Perl code, abide by perlstyle: use 4-space indentation, no tabs, spaces around operators etc. Really read
Follow the Perl Best Practices. Ideally, your code should pass Perl::Critic on at least the gentle setting.
In Template::Toolkit code, use 4-space indentation for HTML code, and 2-space indentation for TT code. See rationale and examples at Indenting TT and HTML.
Line length is 120 characters per line
. Nobody really uses 80-character lines any more, many existing lines are already longer than 80 characters (and perltidy wraps them horrendously), and we don't print out code. If you are using Perl::Tidy to automatically format your code, you can set a different line length via:
perltidy --perl-best-practices -l=115
However, in the tradition of Catalyst code, use of perltidy is discouraged. For example, Catalyst::Stats does not vertically align on '.', and Catalyst::Test does not wrap at anything less than 112 characters.
Marcus' last word on this is "In general I want catalyst style code, if people run perltidy on stuff they write, I don't mind. I just want a readable codebase that is easy to contribute to."