allow chaining
Closed this issue · 2 comments
forwardever commented
accessor chaining would be very useful:
package Hello;
use Mo;
has 'first';
has 'second';
my $hello = Hello->new;
$hello->first('foo')->second('bar');
print $hello->first;
print $hello->second;
ingydotnet commented
This seems non-Moose and out of scope. You can always:
my $hello = Hello->new(
first => 'foo',
second => 'bar',
);
I actually like to chain, but it's not for Mo. At least not for now.
shadowcat-mst commented
Neither Moo nor Moose nor Mouse does this by default, and nor do the vast majority of pre-Moose accessor builders.
Closing.