Int,
sub {
my ($dependent_int, $constraining_arrayref) = @_;
- (grep { $_ == $dependent_int} @$constraining_arrayref) ? 0:1
+ (grep { $_ == $dependent_int} @$constraining_arrayref) ? undef:1
},
ArrayRef[Int],
];
subtype UniqueInt2,
as depending {
my ($dependent_int, $constraining_arrayref) = @_;
- (grep { $_ == $dependent_int} @$constraining_arrayref) ? 0:1
- } Int, ArrayRef[Int];
+ (grep { $_ == $dependent_int} @$constraining_arrayref) ? undef:1
+ } Int, ArrayRef[Int],
+ where {
+ use Data::Dump qw/dump/;
+ warn dump @_;
+ }
isa_ok UniqueInt2, 'MooseX::Meta::TypeConstraint::Dependent';
ok !UniqueInt2->check(['a',[1,2,3]]), '"a" not an Int';