Commit | Line | Data |
81766020 |
1 | #!/usr/bin/perl |
2 | |
3 | use strict; |
4 | use warnings; |
5 | |
6 | use Test::More; |
7 | |
8 | eval "use Test::Output"; |
9 | plan skip_all => "Test::Output is required for this test" if $@; |
10 | |
11 | plan tests => 1; |
12 | |
13 | { |
14 | package ModdedNew; |
15 | use Moose; |
16 | |
17 | before 'new' => sub { }; |
18 | } |
19 | |
20 | { |
21 | package Foo; |
22 | use Moose; |
23 | |
24 | extends 'ModdedNew'; |
25 | |
26 | ::stderr_is( |
27 | sub { Foo->meta->make_immutable }, |
0003b201 |
28 | "Not inlining a constructor for Foo since it is not inheriting the default Moose::Object constructor\nIf you are certain you don't need to inline your constructor, specify inline_constructor => 0 in your call to Foo->meta->make_immutable\n (constructor has method modifiers which would be lost if it were inlined)\n", |
81766020 |
29 | 'got a warning that Foo may not have an inlined constructor' |
30 | ); |
31 | } |