Biotech > FAQ > BioPerl FAQ (Frequently Asked Questions)

Why can't I easily get a list of all the methods...

To see other biotech frequently asked questions, please visit

(Continued from previous question...)

Why can't I easily get a list of all the methods a object can call?

This a problem with perl, not only with bioperl. To list all the methods, you have to walk the inheritance tree and standard perl is not able to do it. As usual, help can be found in the CPAN. Install the CPAN module Class::Inspector and put the following script perlmethods into your path and run it, e.g, >perlmethods Bio::Seq.

  #!/usr/bin/perl -w
  use Class::Inspector;
  $class = shift || die "Usage: methods perl_class_name\n";
  eval "require $class";
  print join ("\n", sort @{Class::Inspector->methods($class,'full','public')}), "\n";

There is also a project called Deobfuscator developed during the 2005 Bioinformatics course at Cold Spring Harbor Labs. The Deobfuscator displays available methods for an object type and provide links to the return types of the methods. An older version can also be found here.

(Continued on next question...)

Other Frequently Asked Questions