Dancer::RPCPlugin::DispatchItem - Small object to handle dispatch-table items
use Dancer::RPCPlugin::DispatchItem;
use Dancer::Plugin::RPC::JSONRPC;
jsonrpc '/json' => {
publish => sub {
return {
'system.ping' => dispatch_item(
code => MyProject::Module1->can('sub1'),
package => 'Myproject::Module1',
),
};
},
};
Arguments
Named:
- code => $code_ref [Required]
- package => $package [Optional]
Arguments
Named:
- code => $code_ref [Required]
- package => $package [Optional]
Getter for the "code" attibute.
Getter for the "package" attribute
(c) MMXVI - Abe Timmerman <abetim@cpan.org>