-
Notifications
You must be signed in to change notification settings - Fork 42
Coding Standards
notbenh edited this page Mar 7, 2013
·
10 revisions
- Non-policy changes, typos, wording, formatting and such, can be done by anyone.
- Policy changes should be submitted as an issue.
- Changes to .perlcritic and .perltidy can be done as pull requests.
- Not sure what to do or what something means? Ask.
- Anyone can correct the code to better match style.
- Syntax style is codified in .perltidy.
- As much coding style as possible is codified in .perlcritic
- Running
./Build tidy
and./Build critic
will runperltidy
andperlcritic
respectively.
- t/00_TEST_TEMPLATE.t is a template for writing tests. Copy it to make new test files.
- Tests should use Test::Most, with no test count specified.
- Tests should use perl5i::latest, not perl5i::2. This will make creating a new major version easier.
- Tests should have a #! line.
- Each test file should test a single method or group of related methods, or a single, complicated bug.
- Tests which require complicated set up should go in their own test file.
- Sets of related test files should go into a sub-directory.
- perl5i specific testing libraries should go into t/lib
- Error is indicated not by returning false, but by throwing an exception.
- The documentation does not have a version number, for example lib/perl5i.pm and lib/perl5i/Meta.pod.
- The code has a major version, for example lib/perl5i/2.pm and lib/perl5i/2/HASH.pm.