#!/usr/bin/perl -w
use strict;
use WWW::Gazetteer;
use YAML;
my $g1 = WWW::Gazetteer->new('calle');
my $g2 = WWW::Gazetteer->new('heavensabove');
print Dump($g1->find("Bath", "GB"));
print Dump($g2->find("Bath", "GB"));
and it prints out:
--- #YAML:1.0
city: Bath
country: GB
elevation: 132
latitude: 51.3833
longitude: -2.3500
--- #YAML:1.0
alias: ''
elevation: 74
latitude: 51.378
longitude: -2.366
name: Bath
region: Avon
regionname: county
Now how many subclasses are we going to have?
PS: Don't use this for navigation!
Avon? (Score:2)
Nicely done.