#### or, make required accept undef and use a predicate test
-has 'foo' => ( isa => 'Int | Undef', is => 'rw', coerce => 1, lazy_build => 1 );
-has 'bar' => ( isa => 'Int | Undef', is => 'rw', coerce => 1 );
+has 'foo' => ( isa => 'Int | Undef', is => 'rw', lazy_build => 1 );
+has 'bar' => ( isa => 'Int | Undef', is => 'rw' );
sub _build_foo { undef }
package main;
-use Test::More tests => 4;
+use Test::More;
ok ( !defined(Foo->new->bar), 'NonLazyBuild: Undef default' );
ok ( !defined(Foo->new->bar(undef)), 'NonLazyBuild: Undef explicit' );
## This test fails at the time of creation.
ok ( !defined(Foo->new->foo(undef)), 'LazyBuild: Undef explicit' );
-
-1;
+done_testing;