in reply to Accessing Trac via XML::RPC

This example in the XML::RPC documentation:
my $result = $xmlrpc->call( 'examples.getStateStruct', { state1 => 12, state2 => 28 } );
may also be written:
my $result = $xmlrpc->call('examples.getStateStruct', { state1 => sub { {i4 => 12} }, state2 => 28 }
The i4 designates the XML::RPC data type (4-byte integer).

This example:

$xmlrpc->call( 'method_name', { name => sub { {'base64' => encode_base64($data)} } } );
will add a named parameter called 'name' with a data type of 'base64'. This is a way of passing arbitrary binary data.

Since perl doesn't have a special way to designate boolean values, you have to do this to pass boolean typed parameters:

$xmlrpc->call(..., { name => sub { {boolean => $value} } });
It would be a good idea to make sure that $value is either 0 or 1.

Here's a succinct overview of XML-RPC data types: http://www.xmlrpc.com/spec

To learn more about anonymous subroutines (aka CODEREFs), have a look at perldoc perlsub.