;
use warnings;
our $VERSION = '0.01';
use Carp;
use Data::Dumper qw( Dumper );
use Encode;
use JSON;
use HTTP::Request;
use LWP::UserAgent;
use Params::Validate;
use URI;
sub new {
my($class,
de_utf8( $destinations ) : $destinations;
my $url = sprintf "%s://%s/maps/api/distancematrix/json",
( $self->{https} ? 'https' : 'http' ), $self->{host};
my $uri = URI->new($url);
type !~ /json/ ) {
my $ct = $res->headers->content_type;
croak "Invalid content-type '$ct' returned from webserver";
}
my $json = JSON->new->utf8;
my $data = $json->decode