Skip Menu |
 

This queue is for tickets about the HTML-GoogleMaps CPAN distribution.

Report information
The Basics
Id: 87728
Status: new
Priority: 0/
Queue: HTML-GoogleMaps

People
Owner: Nobody in particular
Requestors: LEEJO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: make test fails due to Geo::Coder::Google API changes
Download (untitled) / with headers
text/plain 776b
Geo::Coder::Google now defaults to Geo::Coder::Google::V2 (and has done since v0.07) unless the apiver is passed to it in the constructor. This breaks the tests as the local sub overload does not overload Geo::Coder::Google::V2. Patch is as follows: diff -u t/HTML-GoogleMaps.t ../HTML-GoogleMaps.t --- t/HTML-GoogleMaps.t 2009-01-08 04:41:40.000000000 +0100 +++ ../HTML-GoogleMaps.t 2013-08-09 09:57:39.000000000 +0200 @@ -95,6 +95,7 @@ my $map = HTML::GoogleMaps->new(key => 'foo'); no warnings 'redefine'; *Geo::Coder::Google::geocode = sub { +{Point => {coordinates => $stub_loc}} }; + *Geo::Coder::Google::V2::geocode = sub { +{Point => {coordinates => $stub_loc}} }; $stub_loc = [3463, 3925, 0]; $map->add_marker(point => 'result_democritean');
Download (untitled) / with headers
text/plain 998b
On Fri Aug 09 04:06:57 2013, LEEJO wrote: Show quoted text
> Geo::Coder::Google now defaults to Geo::Coder::Google::V2 (and has > done since v0.07) unless the apiver is passed to it in the > constructor. This breaks the tests as the local sub overload does not > overload Geo::Coder::Google::V2. Patch is as follows: > > diff -u t/HTML-GoogleMaps.t ../HTML-GoogleMaps.t > --- t/HTML-GoogleMaps.t 2009-01-08 04:41:40.000000000 +0100 > +++ ../HTML-GoogleMaps.t 2013-08-09 09:57:39.000000000 +0200 > @@ -95,6 +95,7 @@ > my $map = HTML::GoogleMaps->new(key => 'foo'); > no warnings 'redefine'; > *Geo::Coder::Google::geocode = sub { +{Point => {coordinates => > $stub_loc}} }; > + *Geo::Coder::Google::V2::geocode = sub { +{Point => {coordinates => > $stub_loc}} }; > > $stub_loc = [3463, 3925, 0]; > $map->add_marker(point => 'result_democritean');
3 years later the fix now needs to be overriding Geo::Coder::Google::V3. I have forked this dist to HTML::GoogleMaps::V3 to fix the problem. Lee.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.