| 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 |