I need to replace the Perl 5 'wantarray' and think a multi method with
differing return types should do it.
So I've tried this:
multi method foo($a, $b --> {Num,Num}) { #... }
multi method foo($a, $b --> Num) { #... }
and get errors like:
Missing block
at Ellipsoid.pm:672
------> ethod to($lat1, $lon1, $lat2, $lon2 --> �{Rat, Rat})
from test_ellipsoid.pl:12
I've tried parentheses, square brackets, and no grouping characters
instead of curly braces but that doesn't change the error.
Question:
How does one properly provide differing function return type signatures?
Thanks.
Best,
-Tom