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 1     1   949 use strict;
  1         2  
  1         32  
4 1     1   5 use warnings;
  1         1  
  1         24  
5 1     1   5 use WebService::LiveJournal::List;
  1         3  
  1         16  
6 1     1   577 use WebService::LiveJournal::FriendGroup;
  1         3  
  1         263  
7             our @ISA = qw/ WebService::LiveJournal::List /;
8              
9             # ABSTRACT: List of LiveJournal friend groups
10             our $VERSION = '0.07'; # 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__