From: Jason S. <jas...@gm...> - 2008-02-29 02:57:04
|
Meant to send this to the list... ---------- Forwarded message ---------- From: Jason Stewart <jas...@gm...> Date: 29 Feb 2008 08:26 Subject: Re: [Soaplite-devel] bug and comments To: Kostas Chatzikokolakis <ko...@ch...> Hey, On 29/02/2008, Kostas Chatzikokolakis <ko...@ch...> wrote: > if you use My::Serializer instead of XMLRPC::Serializer, then the test > $self eq 'XMLRPC::Serializer' > will fail and arrays will not be encoded correctly. A simple fix is to > change the test to > UNIVERSAL::isa($self, 'XMLRPC::Serializer') looks like a bug... > Another comment wrt subclassing the serializers: many functions call > new() on an object, due do statements of the form: > my $self = shift->new; > As a consequence, when you subclass a serializer your constructor is > called multiple times hmmm... I'm not sure what the purpose of that code is, but it looks like a typical copy constructor idiom. The method wants to use a temporary copy of your object so as not to change the state so it makes a copy by calling new() on the object. If that is so, then your solution of just returning the object could lead into strange behavior. Perhaps Martin or others can clarify. Cheers, jas. |