JSON-RPC
view release on metacpan or search on metacpan
will cause your handlers to receive the following arguments:
sub your_handler_method {
my ($self, $params, $procedure, $arg1, $arg2, $arg3) = @_;
}
This is convenient if you have application-specific data that needs to be passed to your handlers.
# EMBED IT IN YOUR WEBAPP
If you already have a web app (and whatever framework you might already have), you may choose to embed JSON::RPC in your webapp instead of directly calling it in your PSGI application.
For example, if you would like to your webapp's "rpc" handler to marshall the JSON RPC request, you can do something like the following:
package MyApp;
use My::Favorite::WebApp;
sub rpc {
my ($self, $context) = @_;
lib/JSON/RPC.pm view on Meta::CPAN
will cause your handlers to receive the following arguments:
sub your_handler_method {
my ($self, $params, $procedure, $arg1, $arg2, $arg3) = @_;
}
This is convenient if you have application-specific data that needs to be passed to your handlers.
=head1 EMBED IT IN YOUR WEBAPP
If you already have a web app (and whatever framework you might already have), you may choose to embed JSON::RPC in your webapp instead of directly calling it in your PSGI application.
For example, if you would like to your webapp's "rpc" handler to marshall the JSON RPC request, you can do something like the following:
package MyApp;
use My::Favorite::WebApp;
sub rpc {
my ($self, $context) = @_;
( run in 0.367 second using v1.01-cache-2.11-cpan-71847e10f99 )