Auditing
From BioPerl
This page has been added so that developers can contribute code that can be used to audit the Bioperl codebase to check if there are any modules that do not comply with Bioperl Best Practices and thus need updating. There are also script available in the CVS maintenance directory.
Possible areas needing some auditing:
- Checking which tests are still using Test and have not yet been moved over to Test::More.
- Checking test coverage with Devel::Cover to identify modules requiring more in depth tests.
- Checking POD coverage with Pod::Coverage to identify modules that don't have all methods covered.
- Check for usage of things like Bio::Root::IO->catfile which can now be moved over to File::Spec
General coding practices
- Modules using
return undef;instead ofreturn;:
$ grep -rE 'return\s+undef' Bio
- Modules using
use vars qw($var1 %hash1 @array1);instead ofour ($var1, %hash1, @array1):
$ grep -rE 'use\s+vars' Bio
- Modules using escaped quotes instead of generalised quotes qq{}:
$ grep -r '\\"\$' Bio
- Modules using
\U,\Lor\Qinstead ofuc(),lc()andquotemeta():
$ grep -rE '\\U\$|\\L\$|\\Q\$' Bio
Error Handling and Debugging
- Modules using
die()orconfess()instead of$self->throw():
$ grep -rE '(die|confess)\s*' Bio
- Modules using
warn(),carp()orcluck()instead of$self->warn():
$ grep -rE '[^>]\s*(warn|carp|cluck)\s*' Bio
- Modules using
print STDERR "..."instead of$self->debug():
$ grep -rE 'print\s+STDERR' Bio