Commit | Line | Data |
c7a6403f |
1 | #!/usr/bin/env perl |
2 | use strict; |
3 | use warnings; |
4 | use Test::More; |
5 | |
6 | BEGIN { |
7 | eval "use Test::Output;"; |
8 | plan skip_all => "Test::Output is required for this test" if $@; |
9 | plan tests => 1; |
10 | } |
11 | |
12 | do { |
13 | package Parent; |
14 | sub new { bless {}, shift } |
15 | |
16 | package Child; |
17 | BEGIN { our @ISA = 'Parent' } |
18 | use Mouse; |
19 | }; |
20 | |
21 | stderr_is( |
22 | sub { package Child; __PACKAGE__->meta->make_immutable }, |
23 | "Not inlining a constructor for Child since it is not inheriting the default Mouse::Object constructor\n", |
24 | 'Mouse warns when it would have blown away the inherited constructor', |
25 | ); |
26 | |