API/Exception.pm untested

filter: Statementstmt 0.0% 0 / 13 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 / 20 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::Exception;
2  
3 use strict;
4  
5 sub new {
6 my ($class,%options) = @_;
7  
8 my ($code,$message);
9 my $this={};
10 if (ref($options{message})) {
11 $this->{message} = $options{message}->{message};
12 $this->{code} = $options{message}->{code};
13 } else {
14 $this->{message} = $options{message};
15 $this->{code} = $options{code};
16 }
17 return bless $this,$class;
18 }
19  
20 sub is_success { 0; }
21  
22 1;
23 __DATA__