stevan / p5-mop-redux

A(nother) MOP for Perl 5
139 stars 36 forks source link

Defining multiple attributes with one "has" statement #124

Open kraih opened 10 years ago

kraih commented 10 years ago

Might be nice to be able to define multiple attributes with has ($!foo, $!bar);, just like in Perl6, and analogous to my ($foo, $bar);.

doy commented 10 years ago

+1 - I don't see any reason why has and my should be any different in terms of syntax.

tobyink commented 10 years ago

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!