line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AnyEvent::Finger; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
73950
|
use strict; |
|
2
|
|
|
|
|
13
|
|
|
2
|
|
|
|
|
58
|
|
4
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
44
|
|
5
|
2
|
|
|
2
|
|
10
|
use Exporter (); |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
396
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our @ISA = qw( Exporter ); |
8
|
|
|
|
|
|
|
our @EXPORT_OK = qw( finger_client finger_server ); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
# ABSTRACT: Simple asynchronous finger client and server |
11
|
|
|
|
|
|
|
our $VERSION = '0.11'; # VERSION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub finger_client ($$$;$) |
15
|
|
|
|
|
|
|
{ |
16
|
2
|
|
|
2
|
1
|
4777
|
my($hostname) = shift; |
17
|
2
|
|
|
|
|
463
|
require AnyEvent::Finger::Client; |
18
|
2
|
|
|
|
|
14
|
AnyEvent::Finger::Client |
19
|
|
|
|
|
|
|
->new( hostname => $hostname ) |
20
|
|
|
|
|
|
|
->finger(@_); |
21
|
2
|
|
|
|
|
14
|
(); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
# keep the server object in scope so that |
26
|
|
|
|
|
|
|
# we don't unbind from the port. If you |
27
|
|
|
|
|
|
|
# don't want this, then use the OO interface |
28
|
|
|
|
|
|
|
# for ::Server instead. |
29
|
|
|
|
|
|
|
my $keep = []; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub finger_server ($;$) |
32
|
|
|
|
|
|
|
{ |
33
|
1
|
|
|
1
|
1
|
5119
|
require AnyEvent::Finger::Server; |
34
|
1
|
|
|
|
|
8
|
my $server = AnyEvent::Finger::Server |
35
|
|
|
|
|
|
|
->new |
36
|
|
|
|
|
|
|
->start(@_); |
37
|
1
|
|
|
|
|
4
|
push @$keep, $server; |
38
|
1
|
|
|
|
|
2
|
$server; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |