11 use Moose::Util::TypeConstraints;
13 coerce 'Baz' => from 'HashRef' => via { Baz->new($_) };
22 use Moose::Util::TypeConstraints;
24 coerce 'Bar' => from 'HashRef' => via { Bar->new($_) };
42 my $foo = Foo->new(bar => { baz => { hello => 'World' } });
44 isa_ok($foo->bar, 'Bar');
45 isa_ok($foo->bar->baz, 'Baz');
46 is($foo->bar->baz->hello, 'World', '... this all worked fine');