Commit | Line | Data |
81766020 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
3d659f7f |
6 | use Test::More; |
7 | BEGIN { |
8 | eval "use Test::Output;"; |
9 | plan skip_all => "Test::Output is required for this test" if $@; |
3d659f7f |
10 | } |
81766020 |
11 | |
12 | { |
13 | package ModdedNew; |
14 | use Moose; |
15 | |
16 | before 'new' => sub { }; |
17 | } |
18 | |
19 | { |
20 | package Foo; |
21 | use Moose; |
22 | |
23 | extends 'ModdedNew'; |
24 | |
eedb62c7 |
25 | ::stderr_like( |
81766020 |
26 | sub { Foo->meta->make_immutable }, |
e6f3e98e |
27 | qr/\QNot inlining 'new' for Foo since it has method modifiers which would be lost if it were inlined/, |
81766020 |
28 | 'got a warning that Foo may not have an inlined constructor' |
29 | ); |
30 | } |
a28e50e4 |
31 | |
32 | done_testing; |