diff options
Diffstat (limited to 't/lib/RTest/TestDB/Baz.pm')
-rw-r--r-- | t/lib/RTest/TestDB/Baz.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/lib/RTest/TestDB/Baz.pm b/t/lib/RTest/TestDB/Baz.pm index 3ab411d..ad4c61e 100644 --- a/t/lib/RTest/TestDB/Baz.pm +++ b/t/lib/RTest/TestDB/Baz.pm @@ -10,7 +10,15 @@ use Reaction::Types::Core qw/NonEmptySimpleStr/; has 'id' => (isa => Int, is => 'ro', required => 1); has 'name' => (isa => NonEmptySimpleStr, is => 'rw', required => 1); -has 'foo_list' => (isa => ArrayRef, is => 'ro', required => 1); +has 'foo_list' => ( + isa => ArrayRef, + is => 'rw', + required => 1, + writer => 'set_foo_list', + reader => 'get_foo_list', + ); + +around get_foo_list => sub { [ $_[1]->foo_list->all ] }; use namespace::clean -except => [ 'meta' ]; |