On Sat, Mar 14, 2015 at 5:19 PM, Tom Browder <[email protected]> wrote:
> I am trying to convert a fairly simple Perl 5 program and supporting
> modules to Perl 6 and making slow progress.
I have made much progress since Moritz showed me how to use perl6-m.
Now I have come to a point where I haven't yet found what the problem
is or how to fix it.
Using perl6-m version:
2015.02-247-gab55cb7 built on MoarVM version 2015.02-25-g3d0404a
with the same file ('Ellipsoid.pm) but in its present state I execute:
$ perl6-m Ellipsoid.pm
and see:
===SORRY!=== Error while compiling Ellipsoid.pm
Placeholder variables cannot be used in a method
at Ellipsoid.pm:352
------> method� set_custom_ellipsoid
make: *** [test-e] Error 1
The file is located here:
https://gist.github.com/4f3651c350774e065d3b
The initial part of the code for the offending method definition is:
method set_custom_ellipsoid
{
my ($name, $major, $recip) = @_;
$name = uc $name;
$recip = 0 unless defined $recip;
if ($major) {
%ellipsoids{$name} = [ $major, $recip ];
} else {
croak("set_custom_ellipsoid called without semi-major radius parameter");
}
set_ellipsoid($name);
}
I don't see the problem there. Is it possible the problem is in one
of the calls to the method? I looked at all the calls but don't see
an obvious problem.
Thanks.
-Tom