I use Geo::Distance, but noticed that the SQL generated at around line 390 made DBDs powered by SQL::Statement (e.g. DBD::AnyData) die like this:
DBD::AnyData::db prepare failed: Bad table or column name: 'lon >=?' has chars not alphanumeric or underscore! at /usr/lib/perl5/site_perl/5.8.8/SQL/Statement.pm line 88 [for Statement " SELECT lon,lat,code FROM hub_lat_lon WHERE lon>=? AND lat>=? AND lon<=? AND lat<=? "] at /usr/lib/perl5/site_perl/5.8.8/Geo/Distance.pm line 392
I fixed this by putting some spaces in, e.g. "lon>=?" is now "lon >= ?"
You can verify that this is an issue with SQL::Statement by running this code:
use SQL::Statement;
my $parser = SQL::Parser->new();
$parser->parse('SELECT a FROM b WHERE c>=?');
Hi Aran.
I use Geo::Distance, but noticed that the SQL generated at around line 390 made DBDs powered by SQL::Statement (e.g. DBD::AnyData) die like this:
I fixed this by putting some spaces in, e.g. "lon>=?" is now "lon >= ?"
You can verify that this is an issue with SQL::Statement by running this code:
Thanks for incorporating this fix!