Add what does moose stand for section back to docs
[gitmo/Moose.git] / t / metaclasses / immutable_metaclass_compat_bug.t
1 #!/usr/bin/env perl
2 use strict;
3 use warnings;
4 use Test::More;
5
6 {
7     package Foo::Base::Meta::Trait;
8     use Moose::Role;
9 }
10
11 {
12     package Foo::Base;
13     use Moose;
14     Moose::Util::MetaRole::apply_metaroles(
15         for             => __PACKAGE__,
16         class_metaroles => { constructor => ['Foo::Base::Meta::Trait'] },
17     );
18     __PACKAGE__->meta->make_immutable;
19 }
20
21 {
22     package Foo::Meta::Trait;
23     use Moose::Role;
24 }
25
26 {
27     package Foo;
28     use Moose;
29     Moose::Util::MetaRole::apply_metaroles(
30         for             => __PACKAGE__,
31         class_metaroles => { constructor => ['Foo::Meta::Trait'] }
32     );
33     ::ok(!Foo->meta->is_immutable);
34     extends 'Foo::Base';
35     ::ok(!Foo->meta->is_immutable);
36 }
37
38 done_testing;