AnyEvent::Finger::Client - Simple asynchronous finger client
version 0.14
use AnyEvent; use AnyEvent::Finger::Client; my $done = AnyEvent->condvar; my $client = AnyEvent::Finger::Client->new( hostname => 'localhost', ); $client->finger('username', sub { my($lines) = @_; print "[response]\n"; print join "\n", @$lines; }, on_error => sub { print STDERR shift; });
Provide a simple asynchronous finger client.
my $client = AnyEvent::Finger::Client->new(%options);
The constructor takes the following optional arguments:
hostname (default 127.0.0.1)
The hostname to connect to.
port (default 79)
The port to connect to.
timeout (default 60)
The connection timeout.
on_error (carp error)
A callback subref to be called on error (either connection or transmission error). Passes the error string as the first argument to the callback.
$client->finger($request, $callback, [ \%options ])
Connect to the finger server make the given request and call the given callback when the response is complete. The response will be passed to the callback as an array reference of lines. Each line will have the new line (\n or \r or \r\n) removed. Any of the arguments passed into the constructor as passed above may be overridden specifying them in the options hash (third argument).
Graham Ollis <plicease@cpan.org>
This software is copyright (c) 2012-2022 by Graham Ollis.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install AnyEvent::Finger, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AnyEvent::Finger
CPAN shell
perl -MCPAN -e shell install AnyEvent::Finger
For more information on module installation, please visit the detailed CPAN module installation guide.