[MOBY-dev] Perl API: retrieveObjectDefinition call
Pieter Neerincx
Pieter.Neerincx at wur.nl
Wed Nov 2 12:44:21 UTC 2005
Hi all,
Here is a question for those using the Perl API. In
MOBY/Client/Central.pm
we have a
sub retrieveObjectDefinition
which calls
sub _ObjectDefinitionPayload {
This produces an array for the objects, articleNames and lsids for
the relationships of the object whose definition is requested. I'm
wondering why this is an array. Currently I have to rely on the order
of elements in this array to figure out which element is the object,
which one is articleName, etc. These are the lines producing the array:
553 push @{ $relationships{$relationshipType} },
554 [ $_->toString, $article, $rlsid ];
Is there any reason why this should be an array? I'd rather not have
to rely on the order of the elements, so are there people who have
any objections when I change this into a hash like in:
push @{ $relationships{$relationshipType} },
{ object => $_->toString,
articleName => $article,
lsid => $rlsid };
Cheers,
Pieter
Wageningen University and Research centre (WUR)
Laboratory of Bioinformatics
Transitorium (building 312) room 1034
Dreijenlaan 3
6703 HA Wageningen
The Netherlands
phone: 0317-483 060
fax: 0317-483 584
mobile: 06-143 66 783
pieter.neerincx at wur.nl
More information about the MOBY-dev
mailing list