File Coverage

blib/lib/WebService/Bitly/Result/Expand.pm
Criterion Covered Total %
statement 21 21 100.0
branch 1 2 50.0
condition n/a
subroutine 7 7 100.0
pod 1 2 50.0
total 30 32 93.7


line stmt bran cond sub pod time code
1             package WebService::Bitly::Result::Expand;
2              
3 1     1   7 use warnings;
  1         1  
  1         33  
4 1     1   5 use strict;
  1         2  
  1         28  
5 1     1   6 use Carp;
  1         1  
  1         68  
6              
7 1     1   4 use base qw(WebService::Bitly::Result);
  1         2  
  1         87  
8              
9 1     1   556 use WebService::Bitly::Util;
  1         10  
  1         10  
10              
11             sub new {
12 1     1 1 2 my ($class, $result_expand) = @_;
13 1         8 my $self = $class->SUPER::new($result_expand);
14              
15 1         17 $self->{results}
16             = WebService::Bitly::Util->make_entries($self->data->{expand});
17              
18 1         22 return $self;
19             }
20              
21             sub results {
22 1     1 0 356 my $results = shift->{results};
23 1 50       7 return wantarray ? @$results : $results;
24             }
25              
26             1;