On 03/15/2015 08:48 PM, Tom Browder wrote: > 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
You're using @_ here, which in Perl 6 is a variable that indicates a placeholder signature will be used. Another example of variables that introduce a placeholder signature in the sub that contain them are $_ and $^foobar variables, like in: @foobar.sort({ $^a.chars < $^b.chars }) So all you'll have to do is give your set_custom_ellipsoid method a proper signature with $name, $major and $recip in them - and you can even give $recip a default value so that you can get rid of the $recip = 0 unless defined $recip line, too. regards - Timo