use warnings;
use Test::More;
use Test::Moose;
+use Moose::Util qw( does_role );
{
package Foo::Meta::Attribute;
use Moose::Role;
has foo => (traits => ['Quux::Meta::Role::Attribute'], is => 'ro');
+ has baz => (is => 'ro');
}
{
my $foo = Quux->meta->get_attribute('foo');
does_ok($foo, 'Quux::Meta::Role::Attribute',
"individual attribute trait applied correctly");
+
+ my $baz = Quux->meta->get_attribute('baz');
+ ok(! does_role($baz, 'Quux::Meta::Role::Attribute'),
+ "applied_attribute traits do not end up applying to attributes from other roles during composition");
}
{