view release on metacpan or search on metacpan
{
"abstract" : "Simple asynchronous finger client and server",
"author" : [
"Graham Ollis <plicease@cpan.org>"
],
"dynamic_config" : 0,
"generated_by" : "Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
---
abstract: 'Simple asynchronous finger client and server'
author:
- 'Graham Ollis <plicease@cpan.org>'
build_requires:
Test::More: '0.98'
perl: '5.006'
configure_requires:
ExtUtils::MakeMaker: '0'
perl: '5.006'
dynamic_config: 0
generated_by: 'Dist::Zilla version 6.025, CPAN::Meta::Converter version 2.150010'
Makefile.PL view on Meta::CPAN
exit;
}
}
# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.72.
use strict;
use warnings;
use 5.006;
use ExtUtils::MakeMaker;
my %WriteMakefileArgs = (
"ABSTRACT" => "Simple asynchronous finger client and server",
"AUTHOR" => "Graham Ollis <plicease\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "AnyEvent-Finger",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.006",
"NAME" => "AnyEvent::Finger",
"PM" => {
"lib/AnyEvent/Finger.pm" => "\$(INST_LIB)/AnyEvent/Finger.pm",
NAME
AnyEvent::Finger - Simple asynchronous finger client and server
VERSION
version 0.14
SYNOPSIS
client:
use AnyEvent::Finger qw( finger_client );
$tx->res->say('no such user');
}
}
# required! done generating the reply,
# close the connection with the client.
$tx->res->done;
};
DESCRIPTION
This distribution provides an asynchronous finger server and client
which can be used by any event loop supported by AnyEvent. This
specific module provides a simple procedural interface to client and
server classes also in this distribution.
FUNCTIONS
finger_client
finger_client( $server, $request, $callback, [ \%options ] )
lib/AnyEvent/Finger.pm view on Meta::CPAN
package AnyEvent::Finger;
use strict;
use warnings;
use base qw( Exporter );
our @EXPORT_OK = qw( finger_client finger_server );
# ABSTRACT: Simple asynchronous finger client and server
our $VERSION = '0.14'; # VERSION
sub finger_client ($$$;$)
{
my($hostname) = shift;
require AnyEvent::Finger::Client;
AnyEvent::Finger::Client
->new( hostname => $hostname )
->finger(@_);
lib/AnyEvent/Finger.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Finger - Simple asynchronous finger client and server
=head1 VERSION
version 0.14
=head1 SYNOPSIS
client:
use AnyEvent::Finger qw( finger_client );
lib/AnyEvent/Finger.pm view on Meta::CPAN
$tx->res->say('no such user');
}
}
# required! done generating the reply,
# close the connection with the client.
$tx->res->done;
};
=head1 DESCRIPTION
This distribution provides an asynchronous finger server and
client which can be used by any event loop supported by
L<AnyEvent>. This specific module provides a simple procedural
interface to client and server classes also in this distribution.
=head1 FUNCTIONS
=head2 finger_client
finger_client( $server, $request, $callback, [ \%options ] )
lib/AnyEvent/Finger/Client.pm view on Meta::CPAN
package AnyEvent::Finger::Client;
use strict;
use warnings;
use AnyEvent::Socket qw( tcp_connect );
use AnyEvent::Handle;
use Carp qw( carp );
# ABSTRACT: Simple asynchronous finger client
our $VERSION = '0.14'; # VERSION
sub new
{
my $class = shift;
my $args = ref $_[0] eq 'HASH' ? (\%{$_[0]}) : ({@_});
my $port = $args->{port};
$port = 79 unless defined $port;
bless {
lib/AnyEvent/Finger/Client.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Finger::Client - Simple asynchronous finger client
=head1 VERSION
version 0.14
=head1 SYNOPSIS
use AnyEvent;
use AnyEvent::Finger::Client;
lib/AnyEvent/Finger/Client.pm view on Meta::CPAN
$client->finger('username', sub {
my($lines) = @_;
print "[response]\n";
print join "\n", @$lines;
}, on_error => sub {
print STDERR shift;
});
=head1 DESCRIPTION
Provide a simple asynchronous finger client.
=head1 CONSTRUCTOR
my $client = AnyEvent::Finger::Client->new(%options);
The constructor takes the following optional arguments:
=over 4
=item *
lib/AnyEvent/Finger/Request.pm view on Meta::CPAN
package AnyEvent::Finger::Request;
use strict;
use warnings;
use overload
'""' => sub { shift->as_string },
bool => sub { 1 }, fallback => 1;
# ABSTRACT: Simple asynchronous finger request
our $VERSION = '0.14'; # VERSION
sub new
{
bless { raw => "$_[1]" }, $_[0];
}
sub verbose
lib/AnyEvent/Finger/Request.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Finger::Request - Simple asynchronous finger request
=head1 VERSION
version 0.14
=head1 SYNOPSIS
my $request = AnyEvent::Finger::Request->new('foo@localhost');
=head1 DESCRIPTION
lib/AnyEvent/Finger/Response.pm view on Meta::CPAN
package AnyEvent::Finger::Response;
use strict;
use warnings;
# ABSTRACT: Simple asynchronous finger response
our $VERSION = '0.14'; # VERSION
sub say
{
shift->(\@_);
}
sub done
lib/AnyEvent/Finger/Response.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Finger::Response - Simple asynchronous finger response
=head1 VERSION
version 0.14
=head1 DESCRIPTION
This class provides an interface for constructing a response
from a finger server for L<AnyEvent::Finger::Server>. See
the documentation on that class for more details.
lib/AnyEvent/Finger/Server.pm view on Meta::CPAN
use strict;
use warnings;
use Carp qw( carp croak );
use AnyEvent;
use AnyEvent::Handle;
use AnyEvent::Socket qw( tcp_server );
use AnyEvent::Finger::Transaction;
use AnyEvent::Finger::Request;
use AnyEvent::Finger::Response;
# ABSTRACT: Simple asynchronous finger server
our $VERSION = '0.14'; # VERSION
sub new
{
my $class = shift;
my $args = ref $_[0] eq 'HASH' ? (\%{$_[0]}) : ({@_});
my $port = $args->{port};
$port = 79 unless defined $port;
my $forward_deny = $args->{forward_deny};
lib/AnyEvent/Finger/Server.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Finger::Server - Simple asynchronous finger server
=head1 VERSION
version 0.14
=head1 SYNOPSIS
use AnyEvent::Finger::Server;
my $server = AnyEvent::Finger::Server->new;
lib/AnyEvent/Finger/Server.pm view on Meta::CPAN
$tx->res->say('no such user');
}
}
# required! done generating the reply,
# close the connection with the client.
$tx->res->done;
});
=head1 DESCRIPTION
Provide a simple asynchronous finger server.
=head1 CONSTRUCTOR
=head2 new
my $server = AnyEvent::Finger::Server->new(%args);
The constructor takes the following optional arguments:
=over 4
lib/AnyEvent/Finger/Server.pm view on Meta::CPAN
With the response object you can return a whole response at one time:
$tx->res->say(
"this is the first line",
"this is the second line",
"there will be no forth line",
);
$tx->res->done;
or you can send line one at a time as they become available (possibly
asynchronously).
# $dbh is a DBI database handle
my $sth = $dbh->prepare("select user_name from user_list");
while(my $h = $sth->fetchrow_hashref)
{
$tx->res->say($h->{user_name});
}
$tx->res->done;
The server will unbind from its port and stop if the server
lib/AnyEvent/Finger/Transaction.pm view on Meta::CPAN
package AnyEvent::Finger::Transaction;
use strict;
use warnings;
# ABSTRACT: Simple asynchronous finger transaction
our $VERSION = '0.14'; # VERSION
sub res { shift->{res} }
sub req { shift->{req} }
sub remote_port { shift->{remote_port} }
sub local_port { shift->{local_port} }
lib/AnyEvent/Finger/Transaction.pm view on Meta::CPAN
1;
__END__
=pod
=encoding UTF-8
=head1 NAME
AnyEvent::Finger::Transaction - Simple asynchronous finger transaction
=head1 VERSION
version 0.14
=head1 DESCRIPTION
This class is a container for response and request objects
which is used when a finger request comes into
L<AnyEvent::Finger::Server> server instance. It also provides