[Xml-compile] XML::Compile::SOAP::Trace::error in 2.32

Lars Thegler lars at thegler.dk
Mon Jan 14 09:42:37 GMT 2013


I believe this issue was fixed by this patch 2.33 -> 2.34:

@@ -60,7 +60,7 @@ sub compileClient(@)
         {   $ans = try { $decode->($ans) };
             if($@)
             {   $trace->{decode_errors} = $@;
-                my $fatal = $trace->{error} = $@->wasFatal;
+                my $fatal = $trace->{errors} = [$@->wasFatal];
                 $fatal->message($fatal->message->concat("decode error: ", 1));
             }

But this introduces another error, since $fatal has now become an array ref:

Can't call method "message" on unblessed reference at
/usr/local/lib/perl5/site_perl/5.16.2/XML/Compile/SOAP/Client.pm line
65.

/Lars

On Fri, Nov 30, 2012 at 5:30 PM, Roman Daniel <roman.daniel at davosro.cz> wrote:
> Yes, I can be more specific. Look at XML::Compile::SOAP::Trace. By errors
> key I mean $self->{errors} at line 35 and 48.
>
>  33 sub error(;$)
>  34 {   my $self   = shift;
>  35     my $errors = $self->{errors} ||= [];
> ...
> 48 sub errors() { @{shift->{errors} || []} }
>
> Then look at XML::Compile::SOAP::Client
>
>  63                 my $fatal = $trace->{error} = $@->wasFatal;
> ...
>  75         ($ans, XML::Compile::SOAP::Trace->new($trace));
>
>
> It seems that you set $trace->{error} but uses $trace->{errors}
>
> 2012/11/30 Mark Overmeer <mark at overmeer.net>
>>
>> * Roman Daniel (roman.daniel at davosro.cz) [121130 13:18]:
>> > I've just installed XML::Compile::SOAP 2.32 and one of our tests dealing
>> > with SOAP tracing info failed.
>> > The $trace->error() did not return the value expected.
>> >
>> > It seems that in XML::Compile::SOAP::Trace the methods error and
>> > errors work with errors key,
>> > while XML::Compile::SOAP::Client calls the
>> > XML::Compile::SOAP::Trace->new
>> > with error key set.
>> >
>> > Is it an error or am I missing something?
>>
>> This question contains the word 'error' too often :-(  Could you be
>> a little more explicit?  Especially, what is an 'errors key'.
>>
>> The ::Trace::errors() has seen some changes in 2.31 and 2.32: it now
>> should also show protocol errors.  That should be an improvement.
>> That may produce a change in output for your regression test.
>> --
>> Regards,
>>
>>                MarkOv
>>
>> ------------------------------------------------------------------------
>>        Mark Overmeer MSc                                MARKOV Solutions
>>        Mark at Overmeer.net                          solutions at overmeer.net
>> http://Mark.Overmeer.net                   http://solutions.overmeer.net
>>
>
>
> _______________________________________________
> Xml-compile mailing list
> Xml-compile at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile
>



More information about the Xml-compile mailing list