Catalyst-Plugin-JSONRPC-Server
view release on metacpan or search on metacpan
"Scalar::Util" : "0",
"Try::Tiny" : "0",
"namespace::clean" : "0",
"perl" : "5.036"
}
},
"test" : {
"requires" : {
"HTTP::Request::Common" : "0",
"Moose" : "0",
"Test::Fatal" : "0",
"Test::More" : "0.98"
}
}
},
"release_status" : "stable",
"resources" : {
"bugtracker" : {
"web" : "https://github.com/fleetfootmike/Catalyst-Plugin-JSONRPC-Server/issues"
},
"homepage" : "https://github.com/fleetfootmike/Catalyst-Plugin-JSONRPC-Server",
---
abstract: 'Generic JSON-RPC 2.0 server plugin for Catalyst'
author:
- 'Mike Whitaker <mike@altrion.org>'
build_requires:
ExtUtils::MakeMaker: '0'
HTTP::Request::Common: '0'
Moose: '0'
Test::Fatal: '0'
Test::More: '0.98'
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
generated_by: 'ExtUtils::MakeMaker version 7.64, CPAN::Meta::Converter version 2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Catalyst-Plugin-JSONRPC-Server
Makefile.PL view on Meta::CPAN
'Moo' => 0,
'JSON::MaybeXS' => 0,
'Try::Tiny' => 0,
'namespace::clean' => 0,
'Carp' => 0,
'Scalar::Util' => 0,
'Catalyst::Runtime' => '5.90000',
},
TEST_REQUIRES => {
'Test::More' => '0.98',
'Test::Fatal' => 0,
'HTTP::Request::Common' => 0,
'Moose' => 0,
},
META_MERGE => {
'meta-spec' => { version => 2 },
resources => {
repository => {
type => 'git',
url => 'https://github.com/fleetfootmike/Catalyst-Plugin-JSONRPC-Server.git',
web => 'https://github.com/fleetfootmike/Catalyst-Plugin-JSONRPC-Server',
requires 'Moo';
requires 'JSON::MaybeXS';
requires 'Try::Tiny';
requires 'namespace::clean';
requires 'Carp';
requires 'Scalar::Util';
requires 'Catalyst::Runtime', '5.90000';
on test => sub {
requires 'Test::More', '0.98';
requires 'Test::Fatal';
requires 'HTTP::Request::Common';
requires 'Moose';
};
# Author-only: t/perl_critic.t self-skips unless PERL_CRITIC_TEST is set and
# Test::Perl::Critic is installed, so it is a develop dep, not a test requirement.
on develop => sub {
requires 'Test::Perl::Critic';
};
t/dispatcher-errors.t view on Meta::CPAN
use v5.36;
use Test::More;
use Test::Fatal;
use JSON::MaybeXS qw/decode_json/;
use Catalyst::Plugin::JSONRPC::Server::Dispatcher;
use Catalyst::Plugin::JSONRPC::Server::Error;
my $d = Catalyst::Plugin::JSONRPC::Server::Dispatcher->new;
$d->register( ok_method => sub ($p) { 'fine' } );
$d->register( boom => sub ($p) { die "kaboom at secret place\n" } );
$d->register( bad_param => sub ($p) {
Catalyst::Plugin::JSONRPC::Server::Error->throw(
code => -32602, message => 'Invalid params' );
t/dispatcher-single.t view on Meta::CPAN
use v5.36;
use Test::More;
use Test::Fatal;
use Catalyst::Plugin::JSONRPC::Server::Dispatcher;
my $d = Catalyst::Plugin::JSONRPC::Server::Dispatcher->new;
ok( $d->register( echo => sub ($params) { return $params } )
->isa('Catalyst::Plugin::JSONRPC::Server::Dispatcher'),
'register() is chainable' );
# Positional params
my $res = $d->dispatch( '{"jsonrpc":"2.0","method":"echo","params":[1,2,3],"id":1}' );
is_deeply( $res,
t/plugin-hardening.t view on Meta::CPAN
use v5.36;
use Test::More;
use Test::Fatal;
use Catalyst::Plugin::JSONRPC::Server;
use Catalyst::Plugin::JSONRPC::Server::Dispatcher;
# --- minimal stub context (no Catalyst), with an optional ->config ----------
package StubResponse {
sub new { bless {}, shift }
sub status { my $s = shift; $s->{status} = shift if @_; $s->{status} }
sub content_type { my $s = shift; $s->{content_type} = shift if @_; $s->{content_type} }
sub body { my $s = shift; $s->{body} = shift if @_; $s->{body} }
}
( run in 1.425 second using v1.01-cache-2.11-cpan-54e63673c56 )