Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Geo::Google - module setup wrong?

Status
Not open for further replies.

youradds

Programmer
Jun 27, 2001
817
GB
Hi,

Not sure if anyone here can help - but I'm at my wits end with trying to get this to work :(

The code is:

Code:
#!/usr/bin/perl

  use strict;
  use Data::Dumper;
  use Geo::Google;

  #Allen's office
  my $gonda_addr = '25 Gaskyns Close, Rudgwick, West Sussex, RH12 3HE, United Kingdom';
  my $gonda_addr = 'RH12 3HE, United Kingdom';

  #Instantiate a new Geo::Google object.
  my $geo = Geo::Google->new();

  #Create Geo::Google::Location objects.  These contain
  #latitude/longitude coordinates, along with a few other details
  #about the locus.
  my ( $gonda ) = $geo->location( address => $gonda_addr ) || die $geo->error();

  print $gonda->latitude, " / ", $gonda->longitude, "\n";

..when run via SSH, it gives:

linkssql@undevmac cgi-bin $ perl test.cgi
Google couldn't resolve the address 25 Gaskyns Close, Rudgwick, West Sussex, RH12 3HE, United Kingdom but suggested alternate addresses. I attempted to download them but failed. at test.cgi line 16.

Anyone got any ideas? Could it be the server guys didn't install the module right? This is pretty much a direct copy from the documentation of the module - appart from I added this bit, to show the error being given:

|| die $geo->error();

TIA

Andy
 
Sorry, please ignore this line:

my $gonda_addr = 'RH12 3HE, United Kingdom';

(that was me testing it, with less details - but the error message remains the same)

TIA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top