line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Hotline::TrackerListItem; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
## Copyright(c) 1998-2002 by John C. Siracusa. All rights reserved. This |
4
|
|
|
|
|
|
|
## program is free software; you can redistribute it and/or modify it under |
5
|
|
|
|
|
|
|
## the same terms as Perl itself. |
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
73
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
5
|
use vars qw($VERSION); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
331
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
$VERSION = '0.80'; |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new |
14
|
|
|
|
|
|
|
{ |
15
|
0
|
|
|
0
|
1
|
|
my($class, @args) = @_; |
16
|
0
|
|
|
|
|
|
my($self); |
17
|
|
|
|
|
|
|
|
18
|
0
|
0
|
|
|
|
|
if(@args == 5) |
19
|
|
|
|
|
|
|
{ |
20
|
0
|
|
|
|
|
|
$self = |
21
|
|
|
|
|
|
|
{ |
22
|
|
|
|
|
|
|
'ADDRESS' => $args[0], |
23
|
|
|
|
|
|
|
'PORT' => $args[1], |
24
|
|
|
|
|
|
|
'NUM_USERS' => $args[2], |
25
|
|
|
|
|
|
|
'NAME' => $args[3], |
26
|
|
|
|
|
|
|
'DESCRIPTION' => $args[4] |
27
|
|
|
|
|
|
|
}; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
else |
30
|
|
|
|
|
|
|
{ |
31
|
0
|
|
|
|
|
|
$self = |
32
|
|
|
|
|
|
|
{ |
33
|
|
|
|
|
|
|
'ADDRESS' => undef, |
34
|
|
|
|
|
|
|
'PORT' => undef, |
35
|
|
|
|
|
|
|
'NUM_USERS' => undef, |
36
|
|
|
|
|
|
|
'NAME' => undef, |
37
|
|
|
|
|
|
|
'DESCRIPTION' => undef |
38
|
|
|
|
|
|
|
}; |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
0
|
|
|
|
|
|
bless $self, $class; |
42
|
0
|
|
|
|
|
|
return $self; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
sub address |
46
|
|
|
|
|
|
|
{ |
47
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'ADDRESS'} = $_[1] if(@_ == 2); |
48
|
0
|
|
|
|
|
|
return $_[0]->{'ADDRESS'}; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
sub port |
52
|
|
|
|
|
|
|
{ |
53
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'PORT'} = $_[1] if(@_ == 2); |
54
|
0
|
|
|
|
|
|
return $_[0]->{'PORT'}; |
55
|
|
|
|
|
|
|
} |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub num_users |
58
|
|
|
|
|
|
|
{ |
59
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'NUM_USERS'} = $_[1] if(@_ == 2); |
60
|
0
|
|
|
|
|
|
return $_[0]->{'NUM_USERS'}; |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
sub name |
64
|
|
|
|
|
|
|
{ |
65
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'NAME'} = $_[1] if(@_ == 2); |
66
|
0
|
|
|
|
|
|
return $_[0]->{'NAME'}; |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub description |
70
|
|
|
|
|
|
|
{ |
71
|
0
|
0
|
|
0
|
1
|
|
$_[0]->{'DESCRIPTION'} = $_[1] if(@_ == 2); |
72
|
0
|
|
|
|
|
|
return $_[0]->{'DESCRIPTION'}; |
73
|
|
|
|
|
|
|
} |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |