File Coverage

blib/lib/WebService/LiveJournal/FriendGroupList.pm
Criterion Covered Total %
statement 12 27 44.4
branch 0 2 0.0
condition n/a
subroutine 4 6 66.6
pod 0 2 0.0
total 16 37 43.2


line stmt bran cond sub pod time code
1             package WebService::LiveJournal::FriendGroupList;
2              
3 12     12   39 use strict;
  12         12  
  12         292  
4 12     12   35 use warnings;
  12         13  
  12         321  
5 12     12   45 use WebService::LiveJournal::List;
  12         19  
  12         228  
6 12     12   4202 use WebService::LiveJournal::FriendGroup;
  12         19  
  12         1720  
7             our @ISA = qw/ WebService::LiveJournal::List /;
8              
9             # ABSTRACT: List of LiveJournal friend groups
10             our $VERSION = '0.08'; # VERSION
11              
12              
13             sub init
14             {
15 0     0 0   my $self = shift;
16 0           my %arg = @_;
17            
18 0 0         if(defined $arg{response})
19             {
20 0           foreach my $f (@{ $arg{response}->value->{friendgroups} })
  0            
21             {
22 0           $self->push(new WebService::LiveJournal::FriendGroup(%{ $f }));
  0            
23             }
24             }
25            
26 0           return $self;
27             }
28              
29             sub as_string
30             {
31 0     0 0   my $self = shift;
32 0           my $str = "[friendgrouplist \n";
33 0           foreach my $friend (@{ $self })
  0            
34             {
35 0           $str .= "\t" . $friend->as_string . "\n";
36             }
37 0           $str .= ']';
38 0           $str;
39             }
40              
41             1;
42              
43             __END__