Auditing

From BioPerl
Jump to: navigation, search


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 of return;:
$ grep -rE 'return\s+undef' Bio
  • Modules using use vars qw($var1 %hash1 @array1); instead of our ($var1, %hash1, @array1):
$ grep -rE 'use\s+vars' Bio
  • Modules using escaped quotes instead of generalised quotes qq{}:
$ grep -r '\\"\$' Bio
  • Modules using \U, \L or \Q instead of uc(), lc() and quotemeta():
$ grep -rE '\\U\$|\\L\$|\\Q\$' Bio

Error Handling and Debugging

  • Modules using die() or confess() instead of $self->throw():
$ grep -rE '(die|confess)\s*' Bio
  • Modules using warn(), carp() or cluck() 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
Personal tools
Namespaces
Variants
Actions
Main Links
documentation
community
development
Toolbox