Skip Menu |

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

Report information
The Basics
Id: 54837
Status: new
Priority: 0/
Queue: XML-RPC

People
Owner: Nobody in particular
Requestors: tim.besard [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.9
Fixed in: (no value)



Subject: Unparsing empty structs
When passing XML::RPC an empty struct, it parses correctly to an empty <struct />: $xmlrpc->call('method', ({})); ... <?xml version="1.0" encoding="UTF-8" ?> <methodCall> <methodName>method</methodName> <params> <param> <value> <struct></struct> </value> </param> </params> </methodCall> The unparsing however, doesn't construct an empty hash. Instead, it generates an empty string: $VAR1 = [ '' ]; instead of $VAR1 = [ {} ]; When adding data to the hash, all works well: $xmlrpc->call('method', ({1=>2})); ... <?xml version="1.0" encoding="UTF-8" ?> <methodCall> <methodName>method</methodName> <params> <param> <value> <struct> <member> <name>1</name> <value> <i4>2</i4> </value> </member> </struct> </value> </param> </params> </methodCall> ... $VAR1 = [ { '1' => '2' } ];