[Perl5-syntax] signature syntax for method return values
Florian Ragwitz
rafl at debian.org
Tue Mar 3 18:16:03 GMT 2009
On Wed, Feb 25, 2009 at 08:00:59PM +0000, Ash Berlin wrote:
> method to_array (Str $arg) returns ArrayRef[Str] {
> return split /,/, $arg;
> }
Ok. The majority seems to prefer that. Let's go for it.
Did you leave of the [] to actually return a array ref on purpose? Do
you expect the return value to be coerced into the type constraint
automatically? Even if you didn't: I think we need a way to explicitly
enable or disable coercion. Any thoughts about the syntax for that?
--
BOFH excuse #260:
We're upgrading /dev/null
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.scsys.co.uk/pipermail/perl5-syntax/attachments/20090303/58ee405a/attachment.pgp
More information about the Perl5-syntax
mailing list