AnyEvent-JSONRPC
view release on metacpan or search on metacpan
inc/Module/Install/Can.pm view on Meta::CPAN
# Fix Cygwin bug on maybe_command();
if ( $^O eq 'cygwin' ) {
require ExtUtils::MM_Cygwin;
require ExtUtils::MM_Win32;
if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) {
*ExtUtils::MM_Cygwin::maybe_command = sub {
my ($self, $file) = @_;
if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) {
ExtUtils::MM_Win32->maybe_command($file);
} else {
ExtUtils::MM_Unix->maybe_command($file);
}
}
}
}
1;
__END__
#line 156
inc/Module/Install/Metadata.pm view on Meta::CPAN
}
sub write {
my $self = shift;
return $self unless $self->is_admin;
$self->admin->write_meta;
return $self;
}
sub version_from {
require ExtUtils::MM_Unix;
my ( $self, $file ) = @_;
$self->version( ExtUtils::MM_Unix->parse_version($file) );
# for version integrity check
$self->makemaker_args( VERSION_FROM => $file );
}
sub abstract_from {
require ExtUtils::MM_Unix;
my ( $self, $file ) = @_;
$self->abstract(
bless(
{ DISTNAME => $self->name },
'ExtUtils::MM_Unix'
)->parse_abstract($file)
);
}
# Add both distribution and module name
sub name_from {
my ($self, $file) = @_;
if (
Module::Install::_read($file) =~ m/
^ \s*
lib/AnyEvent/JSONRPC/HTTP/Client.pm view on Meta::CPAN
__PACKAGE__->meta->make_immutable;
__END__
=encoding utf-8
=begin stopwords
AnyEvent Coro JSONRPC Hostname Str HTTP HTTP-based
blockingly condvar condvars coroutine unix
=end stopwords
=head1 NAME
AnyEvent::JSONRPC::HTTP::Client - Simple HTTP-based JSONRPC client
=head1 SYNOPSIS
use AnyEvent::JSONRPC::HTTP::Client;
lib/AnyEvent/JSONRPC/HTTP/Server.pm view on Meta::CPAN
sub _batch {
my ($self, @request) = @_;
return [ map { $self->_dispatch($_) } @request ] ;
}
__PACKAGE__->meta->make_immutable;
__END__
=for stopwords JSONRPC TCP TCP-based unix Str
=head1 NAME
AnyEvent::JSONRPC::HTTP::Server - Simple HTTP-based JSONRPC server
=head1 SYNOPSIS
use AnyEvent::JSONRPC::HTTP::Server;
my $server = AnyEvent::JSONRPC::HTTP::Server->new( port => 8080 );
lib/AnyEvent/JSONRPC/HTTP/Server.pm view on Meta::CPAN
);
Available C<%options> are:
=over 4
=item host => 'Str'
Bind address. Default to 'localhost'.
If you want to use unix socket, this option should be set to "unix/"
=item port => 'Int | Str'
Listening port. Default to '8080'.
=back
=head2 reg_cb (%callbacks)
Register JSONRPC methods.
lib/AnyEvent/JSONRPC/TCP/Client.pm view on Meta::CPAN
__PACKAGE__->meta->make_immutable;
__END__
=encoding utf-8
=begin stopwords
AnyEvent Coro JSONRPC Hostname Str TCP TCP-based
blockingly condvar condvars coroutine unix
=end stopwords
=head1 NAME
AnyEvent::JSONRPC::TCP::Client - Simple TCP-based JSONRPC client
=head1 SYNOPSIS
use AnyEvent::JSONRPC::TCP::Client;
lib/AnyEvent/JSONRPC/TCP/Client.pm view on Meta::CPAN
);
Available options are:
=over 4
=item host => 'Str'
Hostname to connect. (Required)
You should set this option to "unix/" if you will set unix socket to port option.
=item port => 'Int | Str'
Port number or unix socket path to connect. (Required)
=item on_error => $cb->($handle, $fatal, $message)
Error callback code reference, which is called when some error occurred.
This has same arguments as L<AnyEvent::Handle>, and also act as handler's on_error callback.
Default is just croak.
If you want to set other options to handle object, use handler_options option showed below.
lib/AnyEvent/JSONRPC/TCP/Server.pm view on Meta::CPAN
push @response, $internal;
}
$handle->push_write( json => [ map { $_->recv } @response ] );
}
__PACKAGE__->meta->make_immutable;
__END__
=for stopwords JSONRPC TCP TCP-based unix Str
=head1 NAME
AnyEvent::JSONRPC::TCP::Server - Simple TCP-based JSONRPC server
=head1 SYNOPSIS
use AnyEvent::JSONRPC::TCP::Server;
my $server = AnyEvent::JSONRPC::TCP::Server->new( port => 4423 );
lib/AnyEvent/JSONRPC/TCP/Server.pm view on Meta::CPAN
my $server = AnyEvent::JSONRPC::TCP::Server->new(
port => 4423,
);
Available C<%options> are:
=over 4
=item port => 'Int | Str'
Listening port or path to unix socket (Required)
=item address => 'Str'
Bind address. Default to undef: This means server binds all interfaces by default.
If you want to use unix socket, this option should be set to "unix/"
=item on_error => $cb->($handle, $fatal, $message)
Error callback which is called when some errors occurred.
This is actually L<AnyEvent::Handle>'s on_error.
=item on_eof => $cb->($handle)
EOF callback. same as L<AnyEvent::Handle>'s on_eof callback.
( run in 1.453 second using v1.01-cache-2.11-cpan-39bf76dae61 )