Ensure that we're not blowing away an inherited constructor
[gitmo/Mouse.git] / t / 040-existing-subclass.t
CommitLineData
c7a6403f 1#!/usr/bin/env perl
2use strict;
3use warnings;
4use Test::More;
5
6BEGIN {
7 eval "use Test::Output;";
8 plan skip_all => "Test::Output is required for this test" if $@;
9 plan tests => 1;
10}
11
12do {
13 package Parent;
14 sub new { bless {}, shift }
15
16 package Child;
17 BEGIN { our @ISA = 'Parent' }
18 use Mouse;
19};
20
21stderr_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