JSON::RPC::Dispatch - Dispatch JSON RPC Requests To Handlers
use JSON::RPC::Dispatch; my $router = Router::Simple->new; # or use Router::Simple::Declare $router->connect( method_name => { handler => $class_name_or_instance, action => $method_name_to_invoke ); my $dispatch = JSON::RPC::Dispatch->new( router => $router ); sub psgi_app { $dispatch->handle_psgi( $env ); }
See docs in JSON::RPC for details
To install JSON::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm JSON::RPC
CPAN shell
perl -MCPAN -e shell install JSON::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.