The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dancer2::RPCPlugin - Role to support generic dispatch-table-building

DESCRIPTION

dispatch_builder(%parameters)

Parameters

Positional:

1. endpoint
2. publish
3. arguments (list of packages for POD-publishing)
4. settings (config->{plugins}{RPC::proto})

rpcplugin_tag

Parameters

None.

Responses

    <jsonrpc|restrpc|xmlrpc>

dispatch_item(%parameters)

Parameters

Named:

code => $code_ref [Required]
package => $package [Optional]

Responses

An instance of the class Dancer2::RPCPlugin::DispatchItem.

partial_method_lister

Setup the structure for listing the rpc-methods that should be in the dispatch-table.

Arguments

Named:

protocol => $plugin-name
endpoint => $endpoint
methods => $list_of_methodnames

code_wrapper

Returns a CodeRef that will be used in the execution of the remote procedure call.

Arguments

Positional:

\%config

A hashref that may contain a code_wrapper key and value.

Responses

When passed via the \%config HashRef, that code_wrapper, otherwise the default code_wrapper:

    sub {
        my $code = shift;
        my $pkg  = shift;
        $code->(@_);
    }

COPYRIGHT

© MMXXII - Abe Timmerman <abeltje@cpan.org>