package Geo::Coder::Mappy;
use strict;
use warnings;
use Carp qw(croak);
use Encode ();
use JSON;
use LWP::UserAgent;
use URI;
our $VERSION = '0.02';
$VERSION = eval $VERSION;
sub new {
my ($c
=> $self->{token},
fullAddress => $location,
'opt.format' => 'json',
'opt.interactive' => 1,
'opt.language' => 'ENG',
'opt.xmlOutput' =
my $content = $res->decoded_content;
return unless $content;
my $data = eval { from_json($content) };
return unless $data;
# Result is a list only if there is more than one item