15 has 'foo' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub {
16 die "Pulling the Foo trigger\n"
19 has 'bar' => (is => 'rw', isa => 'Maybe[Str]');
21 has 'baz' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub {
22 die "Pulling the Baz trigger\n"
25 __PACKAGE__->meta->make_immutable; #(debug => 1);
30 eval { AClass->new(foo => 'bar') };
31 like ($@, qr/^Pulling the Foo trigger/, "trigger from immutable constructor");
33 eval { AClass->new(baz => 'bar') };
34 like ($@, qr/^Pulling the Baz trigger/, "trigger from immutable constructor");
36 is( exception { AClass->new(bar => 'bar') }, undef, '... no triggers called' );