[Bioperl-l] Simple way to list all methods of a bioperl objec t?
Heikki Lehvaslaiho
heikki@ebi.ac.uk
06 Nov 2002 12:50:33 +0000
Hey that's great. I did not know. This a a script I included into my
path:
------------------
#!/usr/bin/perl -w
use Class::Inspector;
$class = shift;
eval "require $class";
print join ("\n", sort @{Class::Inspector->methods($class,'full','public')}),
"\n";
------------------
-Heikki
On Wed, 2002-11-06 at 09:59, Marc Logghe wrote:
>
> >
> > I see that its necessary to write one's own code to do this (i.e. its
> > not been built into perl):
> >
> > # bpinspect1 ():
> > #
> > # Subroutine that identifies from which ancestor module each method
> > # of an object is derived
> >
> That's correct, unfortunately it is not built into Perl.
> FYI, on CPAN you can find a module which will provide you with some
> interesting functions:
> http://search.cpan.org/author/ADAMK/Class-Inspector-0.2/lib/Class/Inspector.
> pm
> Regards,
> Marc
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l@bioperl.org
> http://bioperl.org/mailman/listinfo/bioperl-l
--
______ _/ _/_____________________________________________________
_/ _/ http://www.ebi.ac.uk/mutations/
_/ _/ _/ Heikki Lehvaslaiho heikki@ebi.ac.uk
_/_/_/_/_/ EMBL Outstation, European Bioinformatics Institute
_/ _/ _/ Wellcome Trust Genome Campus, Hinxton
_/ _/ _/ Cambs. CB10 1SD, United Kingdom
_/ Phone: +44 (0)1223 494 644 FAX: +44 (0)1223 494 468
___ _/_/_/_/_/________________________________________________________