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' },
34 foo( x => 42, y => 84 ),
36 'validated_list accepts a plain hash'
40 foo( { x => 42, y => 84 } ),
42 'validated_list accepts a hash reference'
46 bar( x => 42, y => 84 ),
48 'validated_hash accepts a plain hash'
52 bar( { x => 42, y => 84 } ),
54 'validated_hash accepts a hash reference'