Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

46 lines (41 sloc) 1.237 kB
###############################################################################
#
# Sub Name: methodSignature
#
# Description: Retrieve the list of method signatures for the specified
# methods.
#
# Arguments: NAME IN/OUT TYPE DESCRIPTION
# $srv in ref Server object instance
# $arg in ref/sc Listref or scalar specification
#
# Globals: None.
#
# Environment: None.
#
# Returns: Success: listref
# Failure: fault object
#
###############################################################################
sub methodSignature
{
use strict;
my $srv = shift;
my $arg = shift;
my $name = $srv->{method_name};
my @list = (ref $arg) ? @$arg : ($arg);
my (@results, $list, $method);
for (@list)
{
if (ref($method = $srv->get_method($_)) and (! $method->hidden))
{
push(@results,
[ map { [ split(/ /) ] } @{$method->signature} ]);
}
else
{
return RPC::XML::fault->new(302, "$name: Method $_ unknown");
}
}
return (ref $arg) ? \@results : $results[0];
}
Jump to Line
Something went wrong with that request. Please try again.