package JSON::RPC2::AnyEvent::Server::PSGI;
use 5.008005;
use strict;
use warnings;
our $VERSION = "0.01";
use AnyEvent;
use JSON;
use Plack::Request;
use Try::Tiny;
use JSON::RPC2::AnyEvent::Const
ants qw(ERR_PARSE_ERROR);
use JSON::RPC2::AnyEvent::Server;
sub JSON::RPC2::AnyEvent::Server::to_psgi_app {
my ($self) = @_;
sub{
my $req = Plack::Request->new(shift);
if ( $
: _dispatch_json($self, $req);
} else {
return [405, ['Content-type' => 'text/plain'], ['Method Not Allowed']]
}
}
}
my $json = JSON->new->utf8;
sub _disp