Turn composition_class_roles into a plain method.
[gitmo/Moose.git] / t / 050_metaclasses / 030_metarole_combination.t
index 2b1e928..c9291bc 100644 (file)
@@ -97,9 +97,10 @@ our @applications;
     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';
+    };
 }
 
 {
@@ -138,7 +139,7 @@ ok( My::Role::Special->meta->isa('Moose::Meta::Role'),
 );
 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" );