[moby] [MOBY-dev] Perl API: retrieveObjectDefinition call
Pieter Neerincx
Pieter.Neerincx at wur.nl
Fri Nov 4 21:41:50 UTC 2005
On 02Nov2005, at 17:12, Mark Wilkinson wrote:
> I think you're right - that's a much better data structure to be
> passing
> around.
>
> This does change the external (perl client) API, right? :-/
Yep, that's why I'm asking. I have no idea who is currently relying
on the retrieveObjectDefinition call and what might break if I change
it... So far I have heard no complaints, so I suggest I go ahead and
make the change...
>
> Really, what the Perl client code needs is a good laundering. The
> CommonSubs.pm module is a total mess after being modified piecemeal
> over
> the past 3 years...
>
> I wonder if we shouldn't just start a new module (or modules) that are
> named by their domain of function (RegistryIO, OntologyIO, or
> something
> like that) and have all fresh code? Gradually we could migrate all
> functionality into these modules. Client::Central has been around
> since
> the 0.1 prototype of MOBY in 2001 and has never been re-written top-
> to-
> bottom!
That would be a good idea to get cleaner code, but for the time being
it's not that bad! It works as advertised and gets my job done :).
Try debugging SOAP::Lite and MIME::Parser... those are the ones that
really need a complete make-over!
>
> I'm still waiting to hear about the re-funding attempts for MOBY...
> fingers crossed! There will hopefully be a second opportunity
> later in
> the winter, so all is not lost if we fail.
Good luck!
Pieter
> It would be great to have a
> couple of extra hands dedicated to a complete code re-write
>
> M
>
>
>
>
> On Wed, 2005-11-02 at 13:44 +0100, Pieter Neerincx wrote:
>> 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
>>
>>
>>
>> _______________________________________________
>> MOBY-dev mailing list
>> MOBY-dev at biomoby.org
>> http://www.biomoby.org/mailman/listinfo/moby-dev
> --
> "Ontologists do it with the edges!"
>
> Mark Wilkinson
> Asst. Professor
> Dept. of Medical Genetics
> University of British Columbia
> PI in Bioinformatics
> iCAPTURE Centre
> St. Paul's Hospital
> Rm. 166, 1081 Burrard St.
> Vancouver, BC, V6Z 1Y6
> tel: 604 682 2344 x62129
> fax: 604 806 9274
>
> _______________________________________________
> MOBY-dev mailing list
> MOBY-dev at biomoby.org
> http://www.biomoby.org/mailman/listinfo/moby-dev
Wageningen University and Research centre (WUR)
Laboratory of Bioinformatics
Transitorium (building 312) room 1038
Dreijenlaan 3
6703 HA Wageningen
phone: 0317-484 706
fax: 0317-483 584
mobile: 06-143 66 783
pieter.neerincx at wur.nl
More information about the MOBY-dev
mailing list