Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^7: How to make Geo::Coder::Google run even if input location doesn't exist

by AnomalousMonk (Abbot)
on Mar 01, 2013 at 16:03 UTC ( #1021289=note: print w/ replies, xml ) Need Help??


in reply to Re^6: How to make Geo::Coder::Google run even if input location doesn't exist
in thread How to make Geo::Coder::Google run even if input location doesn't exist

In your code at line 27 I see:

if ($@){ "Couldn't get location : $place\n"; ### LINE 27 }else{ ($long, $lat) = @{ $response->{Point}{coordinates} }; }

What is the purpose of defining a nice error message string and then doing absolutely nothing with it? That's the "Useless use of..." something. Did you mean to print this string?

Do you think it's a problem...

Do you think it's a problem? The 'error' you cite is not an error per se, but a warning (see warnings module). Your code will still compile and run when this warning is being generated and you are free to ignore it if you wish, but it's usually a strong signal that something's wrong, as in this case: no  print() call.


Comment on Re^7: How to make Geo::Coder::Google run even if input location doesn't exist
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021289]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (13)
As of 2015-07-06 12:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (73 votes), past polls