[Xml-compile] Syntax errors when loading XML::Compile::Dumper-generated module

Mark Gardner mjg at phoenixtrap.com
Wed Apr 15 16:46:47 GMT 2015


Another patch, this one for XML/Compile/Dumper.pm itself because I'm using
XML::Compile::SOAP::Client. Not sure if you want to use this as-is, or just
for compiled SOAP clients.


--
Mark Gardner $ <mjg at phoenixtrap.com>

On Wed, Apr 15, 2015 at 8:41 AM, Mark Gardner <mjg at phoenixtrap.com> wrote:

> I've attached a diff FWIW.
>
> --
> Mark Gardner $ <mjg at phoenixtrap.com>
>
> On Tue, Apr 14, 2015 at 12:35 PM, Mark Gardner <mjg at phoenixtrap.com>
> wrote:
>
>> I've found a workaround until and unless I can get DDS fixed. If you
>> replace that empty hash reference {} with a hash reference containing an
>> empty list {()}, it compiles OK. I've attached a reduced test case that
>> demonstrates the difference.
>>
>> Would you consider using this syntax as a workaround to
>> XML::Compile::SOAP for now?
>>
>>         my @pairs = ( %{delete $data->{Header} || {()}}
>>                     , %{delete $data->{Body}   || {()}});
>>
>>
>> --
>> Mark Gardner $ <mjg at phoenixtrap.com>
>>
>> On Mon, Mar 23, 2015 at 6:06 PM, Mark Overmeer <mark at overmeer.net> wrote:
>>
>>> * Mark Gardner (mjg at phoenixtrap.com) [150323 21:10]:
>>> > syntax error at lib/WebService/Avalara/AvaTax/TaxSvc.pm line 4459, near
>>> > "%{{} unless"
>>> > syntax error at lib/WebService/Avalara/AvaTax/TaxSvc.pm line 4459,
>>> near ";}"
>>> > Unmatched right curly bracket at
>>> lib/WebService/Avalara/AvaTax/TaxSvc.pm
>>> > line 4459, at end of line
>>> > Unmatched right curly bracket at
>>> lib/WebService/Avalara/AvaTax/TaxSvc.pm
>>> > line 4466, at end of line
>>> > syntax error at lib/WebService/Avalara/AvaTax/TaxSvc.pm line 4466,
>>> near "}"
>>>
>>> Not all Data::Dump::Streamer versions have the same bugs.
>>>
>>> It apparently decodes
>>>
>>>   lib/XML/Compile/SOAP.pm
>>>       my @pairs = ( %{delete $data->{Header} || {}}
>>>                   , %{delete $data->{Body}   || {}});
>>>
>>>
>>> into
>>>   my(@pairs) = ( %{{} unless delete $$data{'Header'};}
>>>                , %{{} unless delete $$data{'Body'};});
>>>
>>> which is explainable but incorrect Perl.
>>> You may be able to get this resolved.
>>>
>>> XML::Compile::Dumper may not help your performance at all:
>>> Data::Dump::Streamer should have some de-duplication implemented.
>>> --
>>> Regards,
>>>
>>>                MarkOv
>>>
>>> ------------------------------------------------------------------------
>>>        Mark Overmeer MSc                                MARKOV Solutions
>>>        Mark at Overmeer.net                          solutions at overmeer.net
>>> http://Mark.Overmeer.net                   http://solutions.overmeer.net
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.scsys.co.uk/pipermail/xml-compile/attachments/20150415/b3da1b68/attachment.htm>
-------------- next part --------------
107a108,110
> 
>  ; package XML::Compile::SOAP::Client;
>    use Log::Report;


More information about the Xml-compile mailing list