one at http://mozilla.org/MPL/2.0/.
package Net::BaruwaAPI;
# use utf8;
use feature 'state';
use JSON::MaybeXS;
use HTTP::Request;
use Carp qw/croak/;
use LWP::UserAgent;
use Type::Params qw/compile/
timeout => 60,
);
},
);
has 'json' => (
is => 'ro',
isa => Object,
lazy => 1,
default => sub {
return JSON::MaybeXS->new( utf8 => 1 );
}
);
sub _call
) and $res->header('Content-Type') =~ 'application/json') {
my $json = $res->decoded_content;
$data = eval { $self->json->decode($json) };
unless ($data) {
die unle