I am running this Perl code:
#!/usr/bin/perl
use strict;
use warnings;
use Geo::Point;
my $gp = Geo::Point->latlong(52.3213, -155.5313, 'wgs84');
my $gp2 = Geo::Point->latlong(30.0000, 30.0000, 'wgs84');
print "$gp\n";
print "$gp2\n";
my $line = Geo::Line->line($gp, $gp2);
my $dist = $line->perimeter;
print "point distance: $dist\n";
--
Parsing the latitude/longitude data into Geo::Point objects works
perfectly. As does the stringification. So nothing gets mixed up while
parsing.
The problem is, when trying to construct a line between the two points
(per the Geo::Line docs), the line cannot be constructed.
--
Expected behaviour: the "arc length" across the curvature of the earth.
I don't know the field-specific terminology for this, I'm not a
cartographer by any means :-)
Got: the following errors:
point[wgs84](52.3213 -155.5313)
point[wgs84](30.0000 30.0000)
Not an ARRAY reference at /usr/local/share/perl/5.10.0/Geo/Line.pm line 185.
This is with 'use strict' and 'use warnings' enabled. However,
diagnostics are not enabled.