JSON::...ispatch(3pm)
πΈ NAME πΈ
okay so this is the JSON::...ispatch(3pm) page from the User Contributed Perl Documentation, bestie β¨ the module's actual name is JSON::RPC::Dispatch, and its whole thing is Dispatch JSON RPC Requests To Handlers. that's the name, that's the assignment, no cap π
β¨ SYNOPSIS β¨
here's the starter pack, literally exactly as written β do not come for me about the formatting, i copied it character for character π«Ά
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 );
}
the vibe is: make a Router::Simple (or use Router::Simple::Declare), connect a method_name to a hashref with handler and action, build your JSON::RPC::Dispatch with router => $router, then in psgi_app call $dispatch->handle_psgi( $env ). iconic little flow, ngl π
π DESCRIPTION π
short and sweet, fr fr: See docs in JSON::RPC for details π that's the whole description. so go read the JSON::RPC docs for the details, iykyk π¦
mwah π sign-off time: this footer energy is source/version perl v5.42.0, date 2015-08-27, and the footer label JSON::...ispatch(3pm). slay, periodt π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-JSON-RPC 1.06-bp160.1.11 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms