6 use Test::More tests => 3;
15 This tests to make sure that we provide the same error messages from
16 an immutable constructor as is provided by a non-immutable
25 has 'foo' => (is => 'rw', isa => 'Int');
27 Foo->meta->make_immutable(debug => 0);
31 throws_ok { Foo->new($scalar) } qr/\QSingle parameters to new() must be a HASH ref/,
32 'Non-ref provided to immutable constructor gives useful error message';
33 throws_ok { Foo->new(\$scalar) } qr/\QSingle parameters to new() must be a HASH ref/,
34 'Scalar ref provided to immutable constructor gives useful error message';