Commit | Line | Data |
ee7f68b6 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
7ff56534 |
6 | use Test::More tests => 2; |
ee7f68b6 |
7 | use Test::Exception; |
8 | |
7ff56534 |
9 | |
ee7f68b6 |
10 | |
11 | { |
12 | package Foo; |
13 | use Moose; |
14 | |
15 | has 'foo' => (is => 'rw', isa => 'Int'); |
16 | |
17 | sub DEMOLISH { } |
18 | } |
19 | |
20 | { |
21 | package Bar; |
22 | use Moose; |
23 | |
24 | extends qw(Foo); |
25 | has 'bar' => (is => 'rw', isa => 'Int'); |
26 | |
27 | sub DEMOLISH { } |
28 | } |
29 | |
30 | lives_ok { |
31 | Bar->new(); |
32 | } 'Bar->new()'; |
33 | |
34 | lives_ok { |
35 | my $bar = Bar->new(); |
36 | $bar->meta->make_immutable; |
37 | } 'Bar->meta->make_immutable'; |