-
-
08 Dec 2020 07:52:54 UTC
- Distribution: Dancer-Plugin-RPC
- Source (raw)
- Browse (raw)
- Changes
- Homepage
- How to Contribute
- Repository
- Issues
- Testers (67 / 1 / 2)
- Kwalitee
Bus factor: 1- % Coverage
- License: perl_5
- Perl: v5.10.1
- Activity
24 month- Tools
- Download (38.7KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
++ed by:2 non-PAUSE users- Dependencies
- Dancer
- JSON
- Params::Validate
- Params::ValidationCompiler
- RPC::XML
- Time::HiRes
- Types::Standard
- YAML
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Dancer::RPCPlugin::CallbackResult - Factory for generating Callback-results.
SYNOPSIS
use Dancer::Plugin::RPC::JSONRPC; use Dancer::RPCPlugin::CallbackResult; jsonrpc '/admin' => { publish => 'config', callback => sub { my ($request, $rpc_method) = @_; if ($rpc_method =~ qr/^admin\.\w+$/) { return callback_success(); } else { return callback_fail( error_code => -32768, error_message => "only admin methods allowed: $rpc_method", ); } }, };
DESCRIPTION
callback_success()
Allows no arguments.
Returns an instantiated Dancer::RPCPlugin::CallbackResult::Success object.
callback_fail(%arguments)
Allows these named arguments:
Returns an instantiated Dancer::RPCPlugin::CallbackResult::Fail object.
PACKAGE
Dancer::RPCPlugin::CallbackResult::Success - Class for success
new()
Constructor, does not allow any arguments.
PACKAGE
Dancer::RPCPlugin::CallbackResult::Fail - Class for failure
new()
Constructor, allows named arguments:
COPYRIGHT
(c) MMXVI - Abe Timmerman <abeltje@cpan.org>
Module Install Instructions
To install Dancer::Plugin::RPC, copy and paste the appropriate command in to your terminal.
cpanm Dancer::Plugin::RPC
perl -MCPAN -e shell install Dancer::Plugin::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.