package Role::WithCustomApplication;
use Moose::Role;
- has '+composition_class_roles' => (
- default => ['Role::Composite'],
- );
+ around composition_class_roles => sub {
+ my ($orig, $self) = @_;
+ return $self->$orig, 'Role::Composite';
+ };
}
{
);
ok( My::Role::Special->meta->meta->does_role('Role::WithCustomApplication'),
"the role's metaobject has custom applications" );
-is_deeply( My::Role::Special->meta->composition_class_roles,
+is_deeply( [My::Role::Special->meta->composition_class_roles],
['Role::Composite'],
"the role knows about the specified composition class" );