そのため、プラグイン自体に何かを渡すにweaver.ini
は Moose 属性が必要なようです。だから私はこのようなものを持っている場合weaver.ini
[Acknowledgements]
contributors = 'test foo' 'foo bar'
プラグインに対応する属性が必要です。
has contributors => (
is => 'rw',
isa => 'ArrayRef[Str]',
traits => [ 'Array' ],
default => sub { [ ] },
handles => {
contributors_count => 'count',
},
);
ただし、エラーが発生します
Attribute (contributors) does not pass the type constraint because: Validation failed for 'ArrayRef[Str]' with value 'test foo' 'foo bar' at /home/xenoterracide/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/x86_64-linux-thread-multi/Moose/Meta/Attribute.pm line 1248
どこが間違っているのかわかりません。構文を上に変更しようとしましたweaver.ini
が、そうではないようです。