$Geo::Coder::OpenCage::VERSION = '0.36';
use strict;
use warnings;
use Carp;
use HTTP::Tiny;
use JSON::MaybeXS;
use Scalar::Util 'blessed';
use URI;
my $version = our $VERSION || 'dev';
my $ua_strin
HTTP::Tiny->new(agent => $ua_string);
my $api_url = 'https://api.opencagedata.com/geocode/v1/json';
if (defined($params{http} && $params{http} == 1 )){
$api_url =~ s|^https|http|
version => $version,
api_key => $params{api_key},
ua => $ua,
json => JSON::MaybeXS->new(utf8 => 1),
url => URI->new($api_url),
};
return bless $