16 has 'foo' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub {
17 die "Pulling the Foo trigger\n"
20 has 'bar' => (is => 'rw', isa => 'Maybe[Str]');
22 has 'baz' => (is => 'rw', isa => 'Maybe[Str]', trigger => sub {
23 die "Pulling the Baz trigger\n"
26 __PACKAGE__->meta->make_immutable; #(debug => 1);
31 eval { AClass->new(foo => 'bar') };
32 like ($@, qr/^Pulling the Foo trigger/, "trigger from immutable constructor");
34 eval { AClass->new(baz => 'bar') };
35 like ($@, qr/^Pulling the Baz trigger/, "trigger from immutable constructor");
37 lives_ok { AClass->new(bar => 'bar') } '... no triggers called';