[Perl5-syntax] signature syntax for method return values

Mike Whitaker mike at altrion.org
Wed Feb 25 19:52:37 GMT 2009


On 25 Feb 2009, at 19:34, Florian Ragwitz wrote:

> I wanted to add return value type constraints to
> MooseX::Method::Signatures for a while now, but I have no idea what  
> the
> signature syntax for that should look like.
>
> Any ideas?
>
> I was thinking something like
>
>  method foo (Str $a, Int $b $some_seperator HashRef) { ... }
>
> or
>
>  method foo (Str $a, Int $b) $some_seperator HashRef { ... }


I vote for
method foo (...args...) returns HashRef { ... }
--
Mike Whitaker - mike at altrion.org





More information about the Perl5-syntax mailing list