#!/usr/bin/env perl
use strict;
use warnings;
use Geo::Coder::Yahoo;
use JSON ();

my $geocoder = Geo::Coder::Yahoo->new(
    appid => 'JkuQW9jV34HYdeuHpZVBR1LLurm3Y9EdVfSqik0YLmgj1jEFu1zzc16PMOdK7HqFOrcJ0qA6'
);

my $location = join " ", @ARGV;

my $json = JSON->new->pretty(1);
my $geos = $geocoder->geocode(location => $location);
print $json->encode($geos);


__END__

=encoding utf-8

=head1 NAME

ygeocode - Geo::Coder::Yahoo command line utility

=head1 OPTIONS

All parameters are taken as the location to be geocoded

=head1 OUTPUT

Currently the output is just a nicely formatted JSON output.

=head1 AUTHOR

Ask Bjørn Hansen, C<< <ask at develooper.com> >>



