line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::LiveJournal::FriendGroup; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
39
|
use strict; |
|
12
|
|
|
|
|
12
|
|
|
12
|
|
|
|
|
259
|
|
4
|
12
|
|
|
12
|
|
34
|
use warnings; |
|
12
|
|
|
|
|
12
|
|
|
12
|
|
|
|
|
192
|
|
5
|
12
|
|
|
12
|
|
37
|
use WebService::LiveJournal::Thingie; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
2661
|
|
6
|
|
|
|
|
|
|
our @ISA = qw/ WebService::LiveJournal::Thingie /; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: LiveJournal friend group class |
9
|
|
|
|
|
|
|
our $VERSION = '0.08'; # VERSION |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new |
13
|
|
|
|
|
|
|
{ |
14
|
0
|
|
|
0
|
0
|
|
my $ob = shift; |
15
|
0
|
|
0
|
|
|
|
my $class = ref($ob) || $ob; |
16
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
17
|
0
|
|
|
|
|
|
my %arg = @_; |
18
|
0
|
|
|
|
|
|
$self->{public} = $arg{public}; |
19
|
0
|
|
|
|
|
|
$self->{name} = $arg{name}; |
20
|
0
|
|
|
|
|
|
$self->{id} = $arg{id}; |
21
|
0
|
|
|
|
|
|
$self->{sortorder} = $arg{sortorder}; |
22
|
0
|
|
|
|
|
|
return $self; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
0
|
1
|
|
sub public { $_[0]->{public} } |
27
|
0
|
|
|
0
|
1
|
|
sub name { $_[0]->{name} } |
28
|
0
|
|
|
0
|
1
|
|
sub id { $_[0]->{id} } |
29
|
0
|
|
|
0
|
1
|
|
sub sortorder { $_[0]->{sortorder} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub as_string { |
32
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
33
|
0
|
|
|
|
|
|
my $name = $self->name; |
34
|
0
|
|
|
|
|
|
my $id = $self->id; |
35
|
0
|
|
|
|
|
|
my $mask = $self->mask; |
36
|
0
|
|
|
|
|
|
my $bin = sprintf "%b", $mask; |
37
|
0
|
|
|
|
|
|
"[friendgroup $name ($id $mask $bin)]"; |
38
|
|
|
|
|
|
|
} |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub mask |
42
|
|
|
|
|
|
|
{ |
43
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
44
|
0
|
|
|
|
|
|
my $id = $self->id; |
45
|
0
|
|
|
|
|
|
2**$id; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
1; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
__END__ |