line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Lyskom::Person; |
2
|
1
|
|
|
1
|
|
6
|
use base qw{Net::Lyskom::Object}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
90
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
33
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Net::Lyskom::Util qw{:all}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
128
|
|
7
|
1
|
|
|
1
|
|
6
|
use Net::Lyskom::Time; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
931
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Net::Lyskom::Person - object holding status for a person |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
print "This user has written ",$obj->created_bytes/1024," kilobytes of texts."; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=head1 DESCRIPTION |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
All methods in this object are read-only and take no arguments. Unless |
21
|
|
|
|
|
|
|
noted otherwise, all methods return simple scalars. |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head2 Methods |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=over |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=item ->username() |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=item ->last_login() |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Returns L object; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=item ->user_area() |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=item ->total_time_present() |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=item ->sessions() |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=item ->created_lines() |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item ->created_bytes() |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=item ->read_texts() |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item ->no_of_text_fetches() |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=item ->created_persons() |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=item ->created_confs() |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=item ->first_created_local() |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=item ->no_of_created_texts() |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=item ->no_of_marks() |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=item ->no_of_confs() |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=item ->wheel() |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=item ->admin() |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=item ->statistic() |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=item ->create_pers() |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
=item ->create_conf() |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=item ->change_name() |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=item ->unread_is_secret() |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=back |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# Accessors |
78
|
0
|
|
|
0
|
1
|
0
|
sub username {my $s = shift; return $s->{username}} |
|
0
|
|
|
|
|
0
|
|
79
|
0
|
|
|
0
|
1
|
0
|
sub last_login {my $s = shift; return $s->{last_login}} |
|
0
|
|
|
|
|
0
|
|
80
|
0
|
|
|
0
|
1
|
0
|
sub user_area {my $s = shift; return $s->{user_area}} |
|
0
|
|
|
|
|
0
|
|
81
|
0
|
|
|
0
|
1
|
0
|
sub total_time_present {my $s = shift; return $s->{total_time_present}} |
|
0
|
|
|
|
|
0
|
|
82
|
0
|
|
|
0
|
1
|
0
|
sub sessions {my $s = shift; return $s->{sessions}} |
|
0
|
|
|
|
|
0
|
|
83
|
0
|
|
|
0
|
1
|
0
|
sub created_lines {my $s = shift; return $s->{created_lines}} |
|
0
|
|
|
|
|
0
|
|
84
|
0
|
|
|
0
|
1
|
0
|
sub created_bytes {my $s = shift; return $s->{created_bytes}} |
|
0
|
|
|
|
|
0
|
|
85
|
0
|
|
|
0
|
1
|
0
|
sub read_texts {my $s = shift; return $s->{read_texts}} |
|
0
|
|
|
|
|
0
|
|
86
|
0
|
|
|
0
|
1
|
0
|
sub no_of_text_fetches {my $s = shift; return $s->{no_of_text_fetches}} |
|
0
|
|
|
|
|
0
|
|
87
|
0
|
|
|
0
|
1
|
0
|
sub created_persons {my $s = shift; return $s->{created_persons}} |
|
0
|
|
|
|
|
0
|
|
88
|
0
|
|
|
0
|
1
|
0
|
sub created_confs {my $s = shift; return $s->{created_confs}} |
|
0
|
|
|
|
|
0
|
|
89
|
0
|
|
|
0
|
0
|
0
|
sub first_created_local_no {my $s = shift; return $s->{first_created_local_no}} |
|
0
|
|
|
|
|
0
|
|
90
|
0
|
|
|
0
|
1
|
0
|
sub no_of_created_texts {my $s = shift; return $s->{no_of_created_texts}} |
|
0
|
|
|
|
|
0
|
|
91
|
0
|
|
|
0
|
1
|
0
|
sub no_of_marks {my $s = shift; return $s->{no_of_marks}} |
|
0
|
|
|
|
|
0
|
|
92
|
1
|
|
|
1
|
1
|
2
|
sub no_of_confs {my $s = shift; return $s->{no_of_confs}} |
|
1
|
|
|
|
|
10
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
# Flags |
95
|
0
|
|
|
0
|
1
|
0
|
sub unread_is_secret {my $s = shift; return $s->{unread_is_secret}} |
|
0
|
|
|
|
|
0
|
|
96
|
|
|
|
|
|
|
|
97
|
|
|
|
|
|
|
# Privs |
98
|
0
|
|
|
0
|
1
|
0
|
sub wheel {my $s = shift; return $s->{wheel}} |
|
0
|
|
|
|
|
0
|
|
99
|
0
|
|
|
0
|
1
|
0
|
sub admin {my $s = shift; return $s->{admin}} |
|
0
|
|
|
|
|
0
|
|
100
|
0
|
|
|
0
|
1
|
0
|
sub statistic {my $s = shift; return $s->{statistic}} |
|
0
|
|
|
|
|
0
|
|
101
|
0
|
|
|
0
|
1
|
0
|
sub create_pers {my $s = shift; return $s->{create_pers}} |
|
0
|
|
|
|
|
0
|
|
102
|
0
|
|
|
0
|
1
|
0
|
sub create_conf {my $s = shift; return $s->{create_conf}} |
|
0
|
|
|
|
|
0
|
|
103
|
0
|
|
|
0
|
1
|
0
|
sub change_name {my $s = shift; return $s->{change_name}} |
|
0
|
|
|
|
|
0
|
|
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
sub new_from_stream { |
106
|
1
|
|
|
1
|
0
|
3
|
my $s = {}; |
107
|
1
|
|
|
|
|
4
|
my $class = shift; |
108
|
1
|
|
|
|
|
2
|
my $ref = shift; |
109
|
|
|
|
|
|
|
|
110
|
1
|
50
|
|
|
|
5
|
$class = ref($class) if ref($class); |
111
|
1
|
|
|
|
|
6
|
bless $s,$class; |
112
|
|
|
|
|
|
|
|
113
|
1
|
|
|
|
|
3
|
$s->{username} = shift @{$ref}; |
|
1
|
|
|
|
|
16
|
|
114
|
1
|
|
|
|
|
3
|
my $privs = shift @{$ref}; |
|
1
|
|
|
|
|
3
|
|
115
|
1
|
|
|
|
|
2
|
my $flags = shift @{$ref}; |
|
1
|
|
|
|
|
2
|
|
116
|
1
|
|
|
|
|
10
|
$s->{last_login} = Net::Lyskom::Time->new_from_stream($ref); |
117
|
1
|
|
|
|
|
4
|
$s->{user_area} = shift @{$ref}; |
|
1
|
|
|
|
|
5
|
|
118
|
1
|
|
|
|
|
3
|
$s->{total_time_present} = shift @{$ref}; |
|
1
|
|
|
|
|
3
|
|
119
|
1
|
|
|
|
|
3
|
$s->{sessions} = shift @{$ref}; |
|
1
|
|
|
|
|
5
|
|
120
|
1
|
|
|
|
|
5
|
$s->{created_lines} = shift @{$ref}; |
|
1
|
|
|
|
|
4
|
|
121
|
1
|
|
|
|
|
5
|
$s->{created_bytes} = shift @{$ref}; |
|
1
|
|
|
|
|
3
|
|
122
|
1
|
|
|
|
|
2
|
$s->{read_texts} = shift @{$ref}; |
|
1
|
|
|
|
|
4
|
|
123
|
1
|
|
|
|
|
3
|
$s->{no_of_text_fetches} = shift @{$ref}; |
|
1
|
|
|
|
|
4
|
|
124
|
1
|
|
|
|
|
3
|
$s->{created_persons} = shift @{$ref}; |
|
1
|
|
|
|
|
5
|
|
125
|
1
|
|
|
|
|
3
|
$s->{created_confs} = shift @{$ref}; |
|
1
|
|
|
|
|
4
|
|
126
|
1
|
|
|
|
|
4
|
$s->{first_created_local} = shift @{$ref}; |
|
1
|
|
|
|
|
3
|
|
127
|
1
|
|
|
|
|
2
|
$s->{no_of_created_texts} = shift @{$ref}; |
|
1
|
|
|
|
|
5
|
|
128
|
1
|
|
|
|
|
2
|
$s->{no_of_marks} = shift @{$ref}; |
|
1
|
|
|
|
|
5
|
|
129
|
1
|
|
|
|
|
2
|
$s->{no_of_confs} = shift @{$ref}; |
|
1
|
|
|
|
|
3
|
|
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
( |
132
|
1
|
|
|
|
|
31
|
$s->{wheel}, |
133
|
|
|
|
|
|
|
$s->{admin}, |
134
|
|
|
|
|
|
|
$s->{statistic}, |
135
|
|
|
|
|
|
|
$s->{create_pers}, |
136
|
|
|
|
|
|
|
$s->{create_conf}, |
137
|
|
|
|
|
|
|
$s->{change_name}, |
138
|
|
|
|
|
|
|
) = $privs =~ /./g; |
139
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
( |
141
|
1
|
|
|
|
|
11
|
$s->{unread_is_secret} |
142
|
|
|
|
|
|
|
) = $flags =~ /./g; |
143
|
|
|
|
|
|
|
|
144
|
1
|
|
|
|
|
13
|
return $s; |
145
|
|
|
|
|
|
|
} |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
1; |