in reply to Re^3: Moose 'clone' Constructor
in thread Moose 'clone' Constructor
OK, thanks. I may have been thinking along the lines of:
has x => (..., default => 'abc'); has y => (..., default => sub { [qw{a b c}] });
where that second line can't be written as:
has y => (..., default => [qw{a b c}]);
But, of course, in the constructor you use the values as is (without needing a coderef):
...->new(x => 'def', y => [qw{d e f}]);
— Ken
|
|---|