4
나는 이것이 아마 내 부분에 펄이나 무스의 일부에 대한 기본적인 오해 실현,하지만 난 default
방법에서 ArrayRef를 반환 할 수있을 것 같지 않습니다MooseX :: Attribute 기본 메소드에서 ArrayRef를 반환하려면 어떻게해야합니까?
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
어떻게 정렬합니까?