Revision 13 - 2012-08-20 at 08:12:10 Rolled Back (Current: 9)

MojoMojo development best practices

Below are the currently agreed-upon development practices for writing MojoMojo code. Discussion are welcome at discussion.

Code tidiness

  1. In Perl code, abide by perlstyle: use 4-space indentation, no tabs, spaces around operators etc. Really read perlstyle.

  2. Follow the Perl Best Practices. Ideally, your code should pass Perl::Critic on at least the gentle setting.

  3. 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.

  4. Line length is 120 characters per line (this happens to also be about how many characters fit in the GitHub UI at 100% zoom). 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: Jam Tangan Murah timbangan Penumbuh Rambut Bisnis Modal Kecil perltidy --perl-best-practices -l=115

  5. 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.

  6. 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." Cellphone parts and ps3 part you should know that.repair part and replacement part. cell phone parts ps3 parts Jasa SEO Jasa SEO Murah Jasa SEO Murah Jasa SEO Jasa Adwords Jasa Google Adwords Google Adwords Sepatu Online Toko Sepatu Online Sepatu Sepatu Murah Sepatu Safety Sepatu Futsal Cheapes Hostgator Coupon Link Booking Televisori offerte Notebook Offerte Berita Terkini Internet Marketer Muda Internet Marketer Indonesia Portatile Apple RDAnet Lorks Karikatur Bisnis Modal Kecil Bisnis UKM Berita Terbaru Iklan Baris Jasa SEO Jasa SEO Murah SEO Indonesia Konsultan SEO SEO Belajar SEO Kursus SEO Kursus SEO Murah Jam Tangan Casio Jam Tangan Casio Jam Tangan Murah Jam Tangan Grosir Baju Terbaru Grosir Baju Baju Terbaru Grosir Baju Murah Bisnis Online Belajar SEO Kerupuk Kerupuk kulit Social Bookmark Dofollow Social Bookmark Kumpulan Puisi Kirim Puisi Penumbuh Rambut Penumbuh Rambut timbangan WBC Wonogiri Jasa SEO Murah Jasa SEO Jam Tangan Murah Jam Tangan Murah Kata Gaul

Cupu Berita Terbaru Android Store Upinson Berita Terkini Edo Ziedo Aplikasi Symbian Sepatu Safety Upin Upin Tablet Android Sepatu Murah Upinson Blogger Radio Streaming SEO Star Upinson Cinta EDU Jasa SEO Sepatu Murah Sepatu Murah Sepatu Murah Penumbuh Rambut Penumbuh Rambut Penumbuh Rambut Penumbuh Rambut Penumbuh Rambut Penumbuh Rambut Penumbuh Rambut

Development best practices

  1. All testable functions should have tests
  2. Every module and function should have POD documentation
  3. For JavaScript, use jQuery.
  4. HTML output should be XHTML 1.0 Strict
  5. CSS 2.

Testing

  1. We use Test::More and Test::Differences. The latter is very handy for diffing long outputs side-by-side, such as full formatter outputs from formatter_all_*.t.
  2. If you write failing tests for upcoming features (TDD), put them in Test::More TODO sections.
  3. Do not put failing regression tests in TODO sections just to have tests pass and ship. Work on fixing the code to pass the tests.

See also

My tags:
 
Popular tags:
 
Powered by Catalyst