deferred constructor construction
[gitmo/Moo.git] / t / class-tiny-accessors.t
CommitLineData
14f32032 1use strictures 1;
2use Test::More;
3
4{
5 package Foo;
6
7 use Class::Tiny;
8
9 has one => (is => 'ro');
10 has two => (is => 'rw', init_arg => undef);
11 has three => (is => 'ro', init_arg => 'THREE', required => 1);
12}
13
14my $foo = Foo->new(
15 one => 1,
16 THREE => 3
17);
18
19is_deeply(
20 { %$foo }, { one => 1, three => 3 }, 'internals ok'
21);
22
23done_testing;