line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package AnyEvent::Finger::Request; |
2
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
71203
|
use strict; |
|
6
|
|
|
|
|
20
|
|
|
6
|
|
|
|
|
179
|
|
4
|
6
|
|
|
6
|
|
30
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
346
|
|
5
|
|
|
|
|
|
|
use overload |
6
|
12
|
|
|
12
|
|
126
|
'""' => sub { shift->as_string }, |
7
|
6
|
|
|
6
|
|
1243
|
bool => sub { 1 }, fallback => 1; |
|
6
|
|
|
0
|
|
1053
|
|
|
6
|
|
|
|
|
52
|
|
|
0
|
|
|
|
|
0
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: Simple asynchronous finger request |
10
|
|
|
|
|
|
|
our $VERSION = '0.12'; # VERSION |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
28
|
|
|
28
|
1
|
24904
|
bless { raw => "$_[1]" }, $_[0]; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub verbose |
20
|
|
|
|
|
|
|
{ |
21
|
18
|
|
|
18
|
1
|
3500
|
my($self) = @_; |
22
|
18
|
50
|
|
|
|
174
|
defined $self->{verbose} ? $self->{verbose} : $self->{verbose} = ($self->{raw} =~ /^\/W/ ? 1 : 0); |
|
|
100
|
|
|
|
|
|
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub username |
27
|
|
|
|
|
|
|
{ |
28
|
39
|
|
|
39
|
1
|
88
|
my($self) = @_; |
29
|
|
|
|
|
|
|
|
30
|
39
|
100
|
|
|
|
119
|
unless(defined $self->{username}) |
31
|
|
|
|
|
|
|
{ |
32
|
22
|
50
|
|
|
|
137
|
if($self->{raw} =~ /^(?:\/W\s*)?([^@]*)/) |
33
|
22
|
|
|
|
|
142
|
{ $self->{username} = $1 } |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
39
|
|
|
|
|
156
|
$self->{username}; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub hostnames |
41
|
|
|
|
|
|
|
{ |
42
|
54
|
|
|
54
|
1
|
106
|
my($self) = @_; |
43
|
54
|
100
|
|
|
|
267
|
return $self->{hostnames} if defined $self->{hostnames}; |
44
|
28
|
100
|
|
|
|
343
|
$self->{hostnames} = ($self->{raw} =~ /\@(.*)$/ ? [split /\@/, $1] : []); |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub as_string |
49
|
|
|
|
|
|
|
{ |
50
|
12
|
|
|
12
|
1
|
33
|
my($self) = @_; |
51
|
12
|
|
|
|
|
37
|
join('@', ($self->username, @{ $self->hostnames })); |
|
12
|
|
|
|
|
32
|
|
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
|
55
|
8
|
100
|
|
8
|
1
|
23
|
sub listing_request { shift->username eq '' ? 1 : 0 } |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
|
59
|
23
|
100
|
|
23
|
1
|
40
|
sub forward_request { @{ shift->hostnames } > 0 ? 1 : 0} |
|
23
|
|
|
|
|
88
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
1; |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
__END__ |