Я понимаю, что это, вероятно, базовое неправильное понимание какой-то части Perl или Moose с моей стороны, но я не могу вернуть ArrayRef из default
метода:
has '_directories' => (
is => 'ro',
isa => 'ArrayRef[Str]',
lazy => 1,
init_arg => undef,
default => method {return File::Spec->splitdir($self->relativeDirectory)});
дает:
Attribute (_directories) does not pass the type constraint because:
Validation failed for 'ArrayRef[Str]' with value 3
Как мне с этим разобраться?