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