Commit | Line | Data |
---|---|---|
bbf64e76 | 1 | use strict; |
2 | use warnings; | |
3 | use Test::More tests => 2; | |
eab81545 | 4 | use Test::Exception; |
bbf64e76 | 5 | |
6 | my $i; | |
7 | ||
8 | { | |
9 | package Parent; | |
10 | use Mouse; | |
11 | sub DEMOLISH { | |
12 | main::is $i++, 1; | |
13 | } | |
14 | no Mouse; | |
15 | __PACKAGE__->meta->make_immutable; | |
16 | } | |
17 | ||
18 | { | |
19 | package Child; | |
20 | use Mouse; | |
21 | extends 'Parent'; | |
22 | sub DEMOLISH { | |
23 | main::is $i++, 0; | |
24 | } | |
25 | __PACKAGE__->meta->make_immutable; | |
26 | } | |
27 | ||
28 | Child->new(); | |
29 |