line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Lyskom::Member; |
2
|
1
|
|
|
1
|
|
6
|
use base qw{Net::Lyskom::Object}; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
86
|
|
3
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
34
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use Net::Lyskom::Time; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
370
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Net::Lyskom::Member - object holding member information |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
print "User was added at ",$obj->added_at->as_string, ".\n"; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 DESCRIPTION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=over |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=item ->member() |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Person number of member. |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=item ->added_by() |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
Person number of person who added the member. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=item ->added_at() |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Timestamp when member was added. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item ->invitation() |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Member is invited. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item ->passive() |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Member is a passive member. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item ->secret() |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Member is a secret member. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=back |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=cut |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
sub new_from_stream { |
49
|
0
|
|
|
0
|
0
|
|
my $s = {}; |
50
|
0
|
|
|
|
|
|
my $class = shift; |
51
|
0
|
|
|
|
|
|
my $ref = shift; |
52
|
|
|
|
|
|
|
|
53
|
0
|
0
|
|
|
|
|
$class = ref($class) if ref($class); |
54
|
0
|
|
|
|
|
|
bless $s, $class; |
55
|
|
|
|
|
|
|
|
56
|
0
|
|
|
|
|
|
$s->{member} = shift @{$ref}; |
|
0
|
|
|
|
|
|
|
57
|
0
|
|
|
|
|
|
$s->{added_by} = shift @{$ref}; |
|
0
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
$s->{added_at} = Net::Lyskom::Time->new_from_stream($ref); |
59
|
0
|
|
|
|
|
|
my $type = shift @{$ref}; |
|
0
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
($s->{invitation}, $s->{passive}, $s->{secret}) = |
62
|
|
|
|
|
|
|
$type =~ /./g; |
63
|
|
|
|
|
|
|
|
64
|
0
|
|
|
|
|
|
return $s; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
|
67
|
0
|
|
|
0
|
1
|
|
sub member {my $s = shift; return $s->{member}} |
|
0
|
|
|
|
|
|
|
68
|
0
|
|
|
0
|
1
|
|
sub added_by {my $s = shift; return $s->{added_by}} |
|
0
|
|
|
|
|
|
|
69
|
0
|
|
|
0
|
1
|
|
sub added_at {my $s = shift; return $s->{added_at}} |
|
0
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
|
71
|
0
|
|
|
0
|
1
|
|
sub invitation {my $s = shift; return $s->{invitation}} |
|
0
|
|
|
|
|
|
|
72
|
0
|
|
|
0
|
1
|
|
sub passive {my $s = shift; return $s->{passive}} |
|
0
|
|
|
|
|
|
|
73
|
0
|
|
|
0
|
1
|
|
sub secret {my $s = shift; return $s->{secret}} |
|
0
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
1; |