8 plan skip_all => "only relevant for Moose 2.0"
9 if Moose->VERSION < 1.9900;
14 use MooseX::UndefTolerant;
19 predicate => 'has_foo',
39 with 'Foo::Role', 'Bar::Role';
65 is(exception { $foo = Foo->new(foo => undef) }, undef,
66 "can set to undef in constructor");
67 ok(!$foo->has_foo, "role attribute isn't set");
70 is(exception { $bar = Bar->new(foo => undef) }, undef,
71 "can set to undef in constructor");
72 ok(!$bar->has_foo, "role attribute isn't set");
75 is(exception { $baz = Baz->new(foo => undef) }, undef,
76 "can set to undef in constructor");
77 ok(!$baz->has_foo, "role attribute isn't set");
80 is(exception { $quux = Quux->new(foo => undef) }, undef,
81 "can set to undef in constructor");
82 ok(!$quux->has_foo, "role attribute isn't set");
83 } 'Foo', 'Bar', 'Baz', 'Quux';