in reply to Re^2: Bioperl + perl modules
in thread Bioperl + perl modules
if $ac is not a valid object of the right type, that code would throw an error: note that you are not indexing a hash here, you're calling an object method. see perltoot for more information on the perl OO system.foreach $key ( $ac->get_all_annotation_keys() ) {
If you want to know what data is stored in a perl variable or object, an easy way to see that is to use the standard Data::Dumper module:
use Data::Dumper; # ... print '$ac: ',Dumper($ac); foreach $key ( $ac->get_all_annotation_keys() ) print '$key: ',Dumper($key); }
That should probably give you some indication of what these objects contain. Note that object can store data in such a way that Data::Dumper doesn't know how to get at it, but it's a start anyway.
|
|---|