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.