The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Dancer::RPCPlugin::DispatchMethodList - Class for maintaining a global methodlist.

SYNOPSIS

use Dancer::RPCPlugin::DispatchMethodList;
my $methods = Dancer::RPCPlugin::DispatchMethodList->new();

$methods->set_partial(
    protocol => <jsonrpc|restrpc|xmlrpc>,
    endpoint => </configured>,
    methods  => [ @method_names ],
);

# ....
my $method_list = $methods->list_methods(protocol => <any|jsonrpc|restrpc|xmlrpc>);

DESCRIPTION

This class implements a singleton that can hold the collection of all method names.

my $dml = Dancer::RPCPlugin::DispatchMethodList->new()

Parameters

None!

Responses

$_singleton = bless $parameters, $class;

$dml->set_partial(%parameters)

Parameters

Named, list:

protocol => <jsonrpc|restrpc|xmlrpc> (required)
endpoint => $endpoint (required)
methods => \@method_list

Responses

$self

list_methods(@parameters)

Method that returns information about the dispatch-table.

Parameters

Positional, list

1. $protocol => undef || <any|jsonrpc|restrpc|xmlrpc> (optional)

Responses

In case of no $protocol:

{
    xmlrpc => {
        $endpoint1 => [ list ],
        $endpoint2 => [ list ],
    },
    jsonrpc => {
        $endpoint1 => [ list ],
        $endpoint2 => [ list ],
    },
}

In case of specified $protocol:

{
    $endpoint1 => [ list ],
    $endpoint2 => [ list ],
}

COPYRIGHT

(c) MMXVI - Abe Timmerman <abeltje@cpan.org>