Net-Lumberjack
view release on metacpan or search on metacpan
"Dist::Zilla::PluginBundle::Basic" : "0",
"Dist::Zilla::PluginBundle::Git" : "0",
"Software::License::Apache_2_0" : "0",
"Test::Pod" : "1.41"
}
},
"runtime" : {
"requires" : {
"Compress::Zlib" : "0",
"IO::Socket::INET6" : "0",
"IO::Socket::SSL" : "0",
"IO::String" : "0",
"JSON" : "0",
"Moose" : "0",
"perl" : "v5.8.5"
}
},
"test" : {
"requires" : {
"Test::Pod" : "0"
}
version: '1.02'
Net::Lumberjack::Reader:
file: lib/Net/Lumberjack/Reader.pm
version: '1.02'
Net::Lumberjack::Writer:
file: lib/Net/Lumberjack/Writer.pm
version: '1.02'
requires:
Compress::Zlib: '0'
IO::Socket::INET6: '0'
IO::Socket::SSL: '0'
IO::String: '0'
JSON: '0'
Moose: '0'
perl: v5.8.5
resources:
bugtracker: https://github.com/benningm/Net-Lumberjack/issues
repository: https://github.com/benningm/Net-Lumberjack
version: '1.02'
x_serialization_backend: 'YAML::Tiny version 1.69'
Makefile.PL view on Meta::CPAN
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Net-Lumberjack",
"LICENSE" => "apache",
"MIN_PERL_VERSION" => "5.008005",
"NAME" => "Net::Lumberjack",
"PREREQ_PM" => {
"Compress::Zlib" => 0,
"IO::Socket::INET6" => 0,
"IO::Socket::SSL" => 0,
"IO::String" => 0,
"JSON" => 0,
"Moose" => 0
},
"TEST_REQUIRES" => {
"Test::Pod" => 0
},
"VERSION" => "1.02",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Compress::Zlib" => 0,
"IO::Socket::INET6" => 0,
"IO::Socket::SSL" => 0,
"IO::String" => 0,
"JSON" => 0,
"Moose" => 0,
"Test::Pod" => 0
);
unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
delete $WriteMakefileArgs{TEST_REQUIRES};
delete $WriteMakefileArgs{BUILD_REQUIRES};
#!perl
requires 'perl', '5.8.5';
requires 'Compress::Zlib';
requires 'IO::Socket::INET6';
requires 'IO::Socket::SSL';
requires 'IO::String';
requires 'JSON';
requires 'Moose';
on 'test' => sub {
requires 'Test::Pod';
# requires 'Test::More';
# requires 'File::Find';
};
lib/Net/Lumberjack/Client.pm view on Meta::CPAN
package Net::Lumberjack::Client;
use Moose;
# ABSTRACT: a client for the lumberjack protocol
our $VERSION = '1.02'; # VERSION
use IO::Socket::INET6;
use IO::Socket::SSL;
use Net::Lumberjack::Writer;
has 'host' => ( is => 'ro', isa => 'Str', default => '127.0.0.1' );
has 'port' => ( is => 'ro', isa => 'Int', default => 5044 );
has 'keepalive' => ( is => 'ro', isa => 'Bool', default => 0 );
has 'frame_format' => ( is => 'ro', isa => 'Maybe[Str]' );
has 'max_window_size' => ( is => 'ro', isa => 'Maybe[Int]' );
lib/Net/Lumberjack/Client.pm view on Meta::CPAN
has 'ssl_version' => ( is => 'ro', isa => 'Maybe[Str]' );
has 'ssl_hostname' => ( is => 'ro', isa => 'Maybe[Str]' );
has 'ssl_cert' => ( is => 'ro', isa => 'Maybe[Str]' );
has 'ssl_key' => ( is => 'ro', isa => 'Maybe[Str]' );
sub _connect {
my $self = shift;
my $sock;
if( $self->use_ssl ) {
$sock = IO::Socket::SSL->new(
PeerHost => $self->host,
PeerPort => $self->port,
SSL_verify_mode => $self->ssl_verify ?
SSL_VERIFY_PEER : SSL_VERIFY_NONE ,
defined $self->ssl_version ?
( SSL_version => $self->ssl_version ) : (),
defined $self->ssl_ca_file ?
( SSL_ca_file => $self->ssl_ca_file ) : (),
defined $self->ssl_ca_path ?
( SSL_ca_file => $self->ssl_ca_path ) : (),
lib/Net/Lumberjack/Client.pm view on Meta::CPAN
Use a non-default CA path to retrieve list of trusted root CAs.
Otherwise the system wide default will be used.
=head2 ssl_version (default: empty)
Use a non-default SSL protocol version string.
Otherwise the system wide default will be used.
Check L<IO::Socket::SSL> for string format.
=head2 ssl_hostname (default: emtpy)
Use a hostname other than the hostname give in 'host' for
SSL certificate verification.
This could be used if you use a IP address to connecting to
server that only lists the hostname in its certificate.
=head2 ssl_cert (default: empty)
lib/Net/Lumberjack/Frame.pm view on Meta::CPAN
'A' => 'Ack',
'W' => 'WindowSize',
'C' => 'Compressed',
'D' => 'Data',
'J' => 'JSON',
);
sub new_from_fh {
my ( $class, $fh ) = ( shift, shift );
my ( $version, $type );
# EOF not supported by IO::Socket::SSL
if( ref($fh) eq 'IO::Socket::SSL') {
if( ! $fh->pending ) {
return;
}
} else {
if( $fh->eof ) {
return;
}
}
if( ! $fh->read( $version, 1 ) || ! $fh->read( $type, 1 ) ) {
die('lost connection');
( run in 0.384 second using v1.01-cache-2.11-cpan-fd5d4e115d8 )