After all of the work coming up with the idea for your code, writing your code, and testing your code (or writing the tests and then writing the code), you may be ready to share your masterpiece with the world. You may feel understandably nervous; even though you know you have good tests, many other things could go wrong ”things you won't recognize until they do go wrong.
Fortunately, the Perl QA group has put together loose guidelines of code kwalitee based on hard-won experience about what makes installing and using software easy and what makes it difficult. The CPAN Testing Service, or CPANTS, currently defines code kwalitee in 17 ways; see http://cpants.dev.zsi.at/kwalitee.html for more information.
Rather than walking through all 17 indicators by hand, why not automate the task?
Download and install Test::Kwalitee . Then add the following code to your t/ directory as kwalitee.t :
#!perl eval { require Test::Kwalitee }; exit if $@; Test::Kwalitee->import( );
Then run the code with perl :
$ perl t/kwalitee.t 1..8 ok 1 - checking permissions ok 2 - looking for symlinks ok 3 - needs a Build.PL or Makefile.PL ok 4 - needs a MANIFEST ok 5 - needs a META.yml ok 6 - needs a README ok 7 - POD should have no errors ok 8 - code should declare all non-core prereqs
The test file is very simple. Test::Kwalitee does all of its work behind the scenes. The eval and exit lines exist to prevent the tests from attempting to run and failing for users who do not have the module installed.
Test::Kwalitee judges the kwalitee of a distribution on eight metrics:
Are the permissions of the files sane? Read-only files cause some installers difficulty.
Are there any symbolic links in the distribution? They do not work on all filesystems.