Skip Menu | will be shut down on March 1st, 2021.

This queue is for tickets about the Frontier-RPC CPAN distribution.

Report information
The Basics
Id: 74091
Status: new
Priority: 0/
Queue: Frontier-RPC

Owner: Nobody in particular
Requestors: wim [...]

Bug Information
Severity: Important
Broken in: 0.07b4
Fixed in: (no value)

Subject: malformed xml when '&' in hash key
Download (untitled) / with headers
text/plain 455b
If your response data has an XML special character like '&' in a key of a hash, that will not be translated to & yielding a "not well-formed (invalid token)" error on decoding. How to reproduce: use Frontier::RPC2; my $coder = Frontier::RPC2->new; my $data={'mykeywith&'=> 1}; my $xml_string = $coder->encode_response($data); print $xml_string; my $call = $coder->decode($xml_string); print Dumper($call); Attached patch solves the problem for me.
text/x-diff 346b
--- /usr/share/perl5/Frontier/ 2007-04-30 10:01:46.000000000 +0200 +++ 2012-01-17 19:11:04.000000000 +0100 @@ -197,6 +197,7 @@ my ($key, $value); while (($key, $value) = each %$hash) { + $key =~ s/([&<>\"])/$char_entities{$1}/ge; push (@text, "<member><name>$key</name>", $self->_item($value),

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to