10 use MooseX::Params::Validate;
13 my ( $x, $y ) = validated_list(
15 x => { isa => 'Any' },
16 y => { isa => 'Any' },
19 return { x => $x, y => $y };
23 my %p = validated_hash(
25 x => { isa => 'Any' },
26 y => { isa => 'Any' },
33 my ( $x, $y ) = pos_validated_list(
39 return { x => $x, y => $y };
44 foo( x => 42, y => 84 ),
46 'validated_list accepts a plain hash'
50 foo( { x => 42, y => 84 } ),
52 'validated_list accepts a hash reference'
56 bar( x => 42, y => 84 ),
58 'validated_hash accepts a plain hash'
62 bar( { x => 42, y => 84 } ),
64 'validated_hash accepts a hash reference'
70 'pos_validated_list accepts a plain array'
76 'pos_validated_list accepts a array reference'