package MyPackage; use strict; use warnings 'all'; # This would import rpc_method into the current namespace: use XMLMethod 'rpc_method'; # Declare a method as rpc-able: rpc_method( 'math.sum', \&API::Math::sum, [qw/ int int int /] ); # Or maybe: rpc_method name => 'math.sum', method => \&API::Math::sum, signature => [qw/ @int /]; rpc_method name => 'math.avg', method => \&API::Math::avg, signature => [qw/ @int /]; rpc_method name => 'string.join', method => \&join, signature => [qw/ @str /];