File Coverage

blib/lib/WebService/LiveJournal/List.pm
Criterion Covered Total %
statement 9 30 30.0
branch 0 4 0.0
condition 0 3 0.0
subroutine 3 7 42.8
pod 0 3 0.0
total 12 47 25.5


line stmt bran cond sub pod time code
1             package WebService::LiveJournal::List;
2              
3 12     12   97 use strict;
  12         41  
  12         374  
4 12     12   66 use warnings;
  12         35  
  12         1014  
5 12     12   95 use overload '""' => sub { $_[0]->as_string }, '@{}' => sub { $_[0]->{list} };
  12     0   36  
  12         178  
  0            
  0            
6              
7             # ABSTRACT: (Deprecated) List base class for WebService::LiveJournal
8             our $VERSION = '0.09'; # 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__
48              
49             =pod
50              
51             =encoding UTF-8
52              
53             =head1 NAME
54              
55             WebService::LiveJournal::List - (Deprecated) List base class for WebService::LiveJournal
56              
57             =head1 VERSION
58              
59             version 0.09
60              
61             =head1 DESCRIPTION
62              
63             B<NOTE>: This distribution is deprecated. It uses the outmoded XML-RPC protocol.
64             LiveJournal has also been compromised. I recommend using DreamWidth instead
65             (L<https://www.dreamwidth.org/>) which is in keeping with the original philosophy
66             LiveJournal regarding advertising.
67              
68             This class is used as the base class for a number of
69             list classes included with the L<WebService::LiveJournal>
70             distribution. You shouldn't need to interact with it
71             directly.
72              
73             =head1 SEE ALSO
74              
75             L<WebService::LiveJournal>
76              
77             =head1 AUTHOR
78              
79             Graham Ollis <plicease@cpan.org>
80              
81             =head1 COPYRIGHT AND LICENSE
82              
83             This software is copyright (c) 2013 by Graham Ollis.
84              
85             This is free software; you can redistribute it and/or modify it under
86             the same terms as the Perl 5 programming language system itself.
87              
88             =cut