AnyEvent-JSONRPC

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

      - BACKWARD INCOMPATIBLE: The API is mostly the same, but with some
                               subtle differences. 
      - Based on JSON::RPC::Common to do most handling of JSON-RPC messages

0.12  2010-05-28T11:35:58+09:00
      - fix a documentation bug (tokuhirom++)

0.11001 2009-09-03T17:57:54+09:00
      - fix pod spell and its test (tokuhirom++)
      - depends latest AnyEvent
      - add recommends line for JSON::XS

0.11  2009-09-03T15:23:56+09:00
      - fix broken pod syntax
      - some refactoring around result condvar (tokuhirom++)

0.10  2009-08-28T20:25:51+09:00
      - BACKWARD INCOMPATIBLE: client's $cv->recv now just get ->{result} directly.
                               and just croak when server returns an error by using $cv->croak
      - added on_error, on_eof callback options to constructor
      - upgrade documents

META.yml  view on Meta::CPAN

    - t
    - xt
recommends:
  AnyEvent::HTTP: 0
  AnyEvent::HTTPD: 0
requires:
  Any::Moose: 0
  AnyEvent: 5.12
  Filter::Util::Call: 0
  JSON::RPC::Common: 0
  JSON::XS: 2.22
  Moose: 0
resources:
  homepage: http://github.com/pmakholm/anyevent-jsonrpc-perl/tree
  license: http://dev.perl.org/licenses/
  repository: git://github.com/pmakholm/anyevent-jsonrpc-perl.git
version: 0.15

Makefile.PL  view on Meta::CPAN

use inc::Module::Install;
name 'AnyEvent-JSONRPC';
all_from 'lib/AnyEvent/JSONRPC.pm';

requires 'Any::Moose';
requires 'Moose';
requires 'AnyEvent' => '5.12';
requires 'JSON::XS' => '2.22';  # For incremental parsing
requires 'JSON::RPC::Common';

recommends 'AnyEvent::HTTP';
recommends 'AnyEvent::HTTPD';

test_requires 'Test::More';
test_requires 'Test::TCP';

author_tests('xt');
use_test_base;

lib/AnyEvent/JSONRPC/HTTP/Client.pm  view on Meta::CPAN

use Carp;
use Scalar::Util 'weaken';

use AnyEvent;
use AnyEvent::HTTP;

use JSON::RPC::Common::Procedure::Call;
use JSON::RPC::Common::Procedure::Return;

use MIME::Base64;
use JSON::XS;

has url => (
    is       => 'ro',
    isa      => 'Str',
    required => 1,
);

has version => (
    is      => 'rw',
    isa     => enum( [qw( 1.0 1.1 2.0 )] ),

lib/AnyEvent/JSONRPC/HTTP/Server.pm  view on Meta::CPAN


extends 'AnyEvent::JSONRPC::Server';

use Carp;
use Scalar::Util 'weaken';

use AnyEvent::JSONRPC::CondVar;

use AnyEvent::HTTPD;

use JSON::XS;
use JSON::RPC::Common::Procedure::Call;

has host => (
    is      => 'ro',
    isa     => 'Str',
    default => '127.0.0.1',
);

has port => (
    is      => 'ro',

lib/AnyEvent/JSONRPC/Server.pm  view on Meta::CPAN

package AnyEvent::JSONRPC::Server;

use Moose;
use JSON::XS;

has json => (
    is      => "ro",
    default => sub {
        JSON::XS->new->allow_blessed(1)->convert_blessed(1);
    },
);

no Moose;

__PACKAGE__->meta->make_immutable;

__END__

=head1 NAME



( run in 0.563 second using v1.01-cache-2.11-cpan-4d50c553e7e )