Dancer2::RPCPlugin::DispatchItem - Small object to handle dispatch-table items
use Dancer2::RPCPlugin::DispatchItem; use Dancer2::Plugin::RPC::JSON; jsonrpc '/json' => { publish => sub { return { 'system.ping' => Dancer2::RPCPlugin::DispatchItem->new( code => MyProject::Module1->can('sub1'), package => 'Myproject::Module1', ), }; }, };
Named:
Getter for the code attibute.
code
Getter for the package attribute
package
(c) MMXVI - Abe Timmerman <abetim@cpan.org>
To install Dancer2::Plugin::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dancer2::Plugin::RPC
CPAN shell
perl -MCPAN -e shell install Dancer2::Plugin::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.