1 use Test::More tests=>1; {
7 use MooseX::Types::Dependent qw(Depending);
8 use MooseX::Types::Moose qw(Int ArrayRef );
9 use MooseX::Types -declare => [qw(
13 ## sugar for alternative syntax: depending {} TC,TC
15 my ($coderef, $dependent_tc, $constraining_tc, @args) = @_;
17 return (Depending[$dependent_tc,$coderef,$constraining_tc],@args);
19 return Depending[$dependent_tc,$coderef,$constraining_tc];
25 my ($dependent_int, $constraining_arrayref) = @_;
26 (grep { $_ == $dependent_int} @$constraining_arrayref) ? undef:1
29 my ($dependent_val, $constraining_value) = @$_;
30 return $dependent_val > 2 ? 1:undef;