p5-mop-redux
p5-mop-redux copied to clipboard
Defining multiple attributes with one "has" statement
Might be nice to be able to define multiple attributes with has ($!foo, $!bar);
, just like in Perl6, and analogous to my ($foo, $bar);
.
+1 - I don't see any reason why has
and my
should be any different in terms of syntax.
I suppose this also implies that the following should work:
has ($!foo, $!bar) = (666, 999);
And then you end up also having to support:
has ($!foo, $!bar) = $self->method_that_returns_a_list;
Argh!