Skip Menu |

This queue is for tickets about the Geo-Calc CPAN distribution.

Report information
The Basics
Id: 70946
Status: resolved
Priority: 0/
Queue: Geo-Calc

People
Owner: Nobody in particular
Requestors: rmesser [...] intellisurvey.com
Cc:
AdminCc:

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



Subject: passing another point as input to $gc->distance_to fails
The docs say you can do this: my $point1 = Geo::Calc->new(lat=>$x1, lon=>$y1); my $point2 = Geo::Calc->new(lat=>$y2, lon=>$y2); my $distance = $point1->distance_to($point2); But that fails. As of version 0.11, you have to do: my $dinstance = $point1->distance_to({lat=>$point2->{lat}, lon=>$point2->{lon}}); That's sort of ugly, it seems that it is just that the Moose method inputs validation only allows a hashref as input, not another Geo::Calc object.
You can use Geo::Calc::XS for that ( also it's way faster ) and I fixed lots of erros in it