API/Response.pm untested

filter: Statementstmt 0.0% 0 / 8 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 15 CC 2 SCAR 13.9
CC
2
Cov
0%
new
6.0
is_success
2.0
BEGIN
2.0
CRAP 4.0
1 package Imgur::API::Response;
2  
3 use strict;
4  
5 sub is_success { 1; }
6  
7 sub new {
8 my ($class,$json) = @_;
9  
10 my $this = $json->{data};
11 if (ref($this) ne "HASH") {
12 $this={data=>$json->{data}};
13 }
14  
15 return bless $this,$class;
16 }
17  
18 1;
19  
20