File Coverage

blib/lib/WebService/Bitly/Result/Lookup.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::Lookup;
2              
3 1     1   6 use warnings;
  1         2  
  1         37  
4 1     1   6 use strict;
  1         2  
  1         56  
5 1     1   8 use Carp;
  1         2  
  1         76  
6              
7 1     1   4 use base qw(WebService::Bitly::Result);
  1         2  
  1         94  
8              
9 1     1   5 use WebService::Bitly::Util;
  1         1  
  1         11  
10              
11             sub new {
12 1     1 1 3 my ($class, $result_lookup) = @_;
13 1         9 my $self = $class->SUPER::new($result_lookup);
14              
15 1         23 $self->{results}
16             = WebService::Bitly::Util->make_entries($self->data->{lookup});
17              
18 1         19 return $self;
19             }
20              
21             sub results {
22 1     1 0 411 my $results = shift->{results};
23 1 50       8 return wantarray ? @$results : $results;
24             }
25              
26             1;