line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::LiveJournal::Friend; |
2
|
|
|
|
|
|
|
|
3
|
12
|
|
|
12
|
|
90
|
use strict; |
|
12
|
|
|
|
|
29
|
|
|
12
|
|
|
|
|
460
|
|
4
|
12
|
|
|
12
|
|
69
|
use warnings; |
|
12
|
|
|
|
|
39
|
|
|
12
|
|
|
|
|
308
|
|
5
|
12
|
|
|
12
|
|
5391
|
use WebService::LiveJournal::Thingie; |
|
12
|
|
|
|
|
34
|
|
|
12
|
|
|
|
|
4334
|
|
6
|
|
|
|
|
|
|
our @ISA = qw/ WebService::LiveJournal::Thingie /; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
# ABSTRACT: (Deprecated) LiveJournal friend class |
9
|
|
|
|
|
|
|
our $VERSION = '0.09'; # 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
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
my %arg = @_; |
19
|
0
|
|
|
|
|
|
$self->{username} = $arg{username}; # req |
20
|
0
|
|
|
|
|
|
$self->{fullname} = $arg{fullname}; # req |
21
|
0
|
|
|
|
|
|
$self->{bgcolor} = $arg{bgcolor}; # req |
22
|
0
|
|
|
|
|
|
$self->{fgcolor} = $arg{fgcolor}; # req |
23
|
0
|
|
|
|
|
|
$self->{type} = $arg{type}; # opt |
24
|
0
|
|
|
|
|
|
$self->{groupmask} = $arg{groupmask}; # req |
25
|
|
|
|
|
|
|
|
26
|
0
|
|
|
|
|
|
return $self; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
0
|
|
|
0
|
0
|
|
sub name { shift->username(@_) } |
31
|
0
|
|
|
0
|
1
|
|
sub username { $_[0]->{username} } |
32
|
0
|
|
|
0
|
1
|
|
sub fullname { $_[0]->{fullname} } |
33
|
0
|
|
|
0
|
1
|
|
sub bgcolor { $_[0]->{bgcolor} } |
34
|
0
|
|
|
0
|
1
|
|
sub fgcolor { $_[0]->{fgcolor} } |
35
|
0
|
|
|
0
|
1
|
|
sub type { $_[0]->{type} } |
36
|
0
|
|
|
0
|
0
|
|
sub groupmask { $_[0]->{groupmask} } |
37
|
0
|
|
|
0
|
1
|
|
sub mask { $_[0]->{groupmask} } |
38
|
|
|
|
|
|
|
|
39
|
0
|
|
|
0
|
0
|
|
sub as_string { '[friend ' . $_[0]->{username} . ']' } |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=pod |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=encoding UTF-8 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 NAME |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
WebService::LiveJournal::Friend - (Deprecated) LiveJournal friend class |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 VERSION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
version 0.09 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 SYNOPSIS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
use WebService::LiveJournal; |
60
|
|
|
|
|
|
|
my $client = WebService::LiveJournal->new( |
61
|
|
|
|
|
|
|
username => $user, |
62
|
|
|
|
|
|
|
password => $pass, |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
# get the list of your friends |
66
|
|
|
|
|
|
|
foreach my $friend (@{ $client->get_friend }) |
67
|
|
|
|
|
|
|
{ |
68
|
|
|
|
|
|
|
# $friend isa WS::LJ::Friend |
69
|
|
|
|
|
|
|
... |
70
|
|
|
|
|
|
|
} |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
# get the list of your stalkers, er... I mean people who have you as a friend: |
73
|
|
|
|
|
|
|
foreach my $friend (@{ $client->get_friend_of }) |
74
|
|
|
|
|
|
|
{ |
75
|
|
|
|
|
|
|
# $friend isa WS::LJ::Friend |
76
|
|
|
|
|
|
|
... |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
=head1 DESCRIPTION |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
B<NOTE>: This distribution is deprecated. It uses the outmoded XML-RPC protocol. |
82
|
|
|
|
|
|
|
LiveJournal has also been compromised. I recommend using DreamWidth instead |
83
|
|
|
|
|
|
|
(L<https://www.dreamwidth.org/>) which is in keeping with the original philosophy |
84
|
|
|
|
|
|
|
LiveJournal regarding advertising. |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
This class represents a friend or user on the LiveJournal server. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 username |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
The name of the user |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head2 fullname |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
The full name (First Last) of the user |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
=head2 bgcolor |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
The background color for the user |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head2 fgcolor |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
The foreground color for the user |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head2 type |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
The type of user |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 mask |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
The group mask of the user |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SEE ALSO |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L<WebService::LiveJournal>, |
117
|
|
|
|
|
|
|
|
118
|
|
|
|
|
|
|
=head1 AUTHOR |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
Graham Ollis <plicease@cpan.org> |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
This software is copyright (c) 2013 by Graham Ollis. |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
127
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=cut |