6 use Test::More tests => 5;
14 package My::Attribute::Trait;
17 has 'alias_to' => (is => 'ro', isa => 'Str');
19 after 'install_accessors' => sub {
21 $self->associated_class->add_method(
23 $self->get_read_method_ref
33 traits => [qw/My::Attribute::Trait/],
40 my $c = My::Class->new(bar => 100);
41 isa_ok($c, 'My::Class');
43 is($c->bar, 100, '... got the right value for bar');
46 is($c->baz, 100, '... got the right value for baz');