File Coverage

blib/lib/WebService/Bitly/Result/Validate.pm
Criterion Covered Total %
statement 17 17 100.0
branch 1 2 50.0
condition n/a
subroutine 6 6 100.0
pod 1 2 50.0
total 25 27 92.5


line stmt bran cond sub pod time code
1             package WebService::Bitly::Result::Validate;
2              
3 1     1   5 use warnings;
  1         2  
  1         35  
4 1     1   6 use strict;
  1         2  
  1         32  
5 1     1   5 use Carp;
  1         1  
  1         77  
6              
7 1     1   5 use base qw(WebService::Bitly::Result);
  1         2  
  1         223  
8              
9             sub new {
10 1     1 1 2 my ($class, $result_validate) = @_;
11 1         10 my $self = $class->SUPER::new($result_validate);
12             }
13              
14             sub is_valid {
15 1     1 0 1081 my $self = shift;
16 1 50       10 return 0 if $self->is_error;
17 1         18 return $self->data->{valid};
18             }
19              
20             1;