From: Martin K. <mar...@fe...> - 2008-09-18 11:17:33
|
Hi Jason, your proposed patch reads fine - I'll try it out. I don't know whether o_value is used somewhere, or whether there has just been some planned usage which has been left unimplemented - I'll have to look it up. SOAP::Lite's biggest problem by now is that the test suite is relatively weak, so we cannot tell whether some change breaks existing SOAP::Lite applications. And SOAP::Lite is so widespread that breaking existing code is a pretty bad thing... Martin Am Donnerstag, den 18.09.2008, 13:56 +0530 schrieb Jason Stewart: > Hey All, > > Is there any feedback on this? > > I would like to clean up the deserialize(), decode(), decode_object(), > decode_value() maze - but I don't understand the implications of how > these subs are inter-connected. > > My reading of the code is that the information that is stored in the > o_value slot of the SOM object is *useless* - the attribute > information has been discarded. Since the deserializer has already > parsed this and stored it all in the _content element of the SOM > object - why is this being re-parsed? > > Cheers, jas. > > On Sun, Sep 14, 2008 at 1:17 PM, Jason Stewart > <jas...@gm...> wrote: > > Hey Martin, > > > > On Sat, Sep 13, 2008 at 11:32 AM, Martin Kutter > > <mar...@fe...> wrote: > >> ... then we probably should change the deserializer to fill all > >> appropriate slots: With a XML node containing XML attributes, clearly > >> the attr slot should be filled. > > > > Here is what I find about the deserializer: > > deserialize() first calls decode() and then calls decode_object() > > which calls decode_value() > > > > decode_value() calls decode_object() for each child element. > > > > decode_value() returns the $child_name and the $child_value. > > > > decode_value() does *not* encode the attributes into the $child_value > > in any way. So that is the main issue. > > > > Here is a meta point. I have no idea why decode_object() is ever > > called by deserialize - presumably it sets up some important SOAP > > internal information. But all the XML data is present after the call > > to decode(). The building up of the o_value slot for the SOM object is > > a waste of time as far as I can tell - given that the return value of > > decode() is a perl data structure representation of the XML, why build > > up a second one that is missing data? > > > > I don't think the SOM methods should use the o_value slot, and instead > > should use the complete data structure that is present in the _content > > key of the SOM object. > > > > Given how new I am at the SOAP code, it is very likely I've > > misunderstood something. > > > > Any feedback? > > > > Cheers, jas. > > > |