line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::LiveJournal::List; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
2678
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
28
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
67
|
|
5
|
1
|
|
|
1
|
|
4
|
use overload '""' => sub { $_[0]->as_string }, '@{}' => sub { $_[0]->{list} }; |
|
1
|
|
|
0
|
|
2
|
|
|
1
|
|
|
|
|
10
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# ABSTRACT: List base class for WebService::LiveJournal |
8
|
|
|
|
|
|
|
our $VERSION = '0.07'; # VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub new |
12
|
|
|
|
|
|
|
{ |
13
|
0
|
|
|
0
|
0
|
|
my $ob = shift; |
14
|
0
|
|
0
|
|
|
|
my $class = ref($ob) || $ob; |
15
|
0
|
|
|
|
|
|
my $self = bless { list => [] }, $class; |
16
|
0
|
|
|
|
|
|
my %arg = @_; |
17
|
0
|
0
|
|
|
|
|
$self->{list} = $arg{list} if defined $arg{list}; |
18
|
0
|
|
|
|
|
|
$self->init(@_); |
19
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
foreach my $member (@{ $self }) |
|
0
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
{ |
22
|
0
|
|
|
|
|
|
$member->client($arg{client}); |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
|
|
|
|
|
return $self; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
sub push |
29
|
|
|
|
|
|
|
{ |
30
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
31
|
0
|
|
|
|
|
|
push @{ $self }, @_; |
|
0
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
} |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
sub find |
35
|
|
|
|
|
|
|
{ |
36
|
0
|
|
|
0
|
0
|
|
my $self = shift; |
37
|
0
|
|
|
|
|
|
my $key = shift; |
38
|
0
|
|
|
|
|
|
foreach my $element (@{ $self }) |
|
0
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
{ |
40
|
0
|
0
|
|
|
|
|
return $element if $element->name eq $key; |
41
|
|
|
|
|
|
|
} |
42
|
0
|
|
|
|
|
|
return; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |