2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
10 package My::Attribute::Trait;
15 scalar reverse $self->name;
25 'My::Attribute::Trait' => {
27 reversed_name => 'eman',
36 package My::Other::Class;
41 'My::Attribute::Trait' => {
43 reversed_name => 'reversed',
45 -excludes => 'reversed_name',
52 my $attr = My::Class->meta->get_attribute('foo');
53 is($attr->eman, 'oof', 'the aliased method is in the attribute');
54 ok(!$attr->can('reversed'), "the method was not installed under the other class' alias");
56 my $other_attr = My::Other::Class->meta->get_attribute('foo');
57 is($other_attr->reversed, 'oof', 'the aliased method is in the attribute');
58 ok(!$other_attr->can('enam'), "the method was not installed under the other class' alias");
59 ok(!$other_attr->can('reversed_name'), "the method was not installed under the original name when that was excluded");