6 use Test::More tests => 2;
12 use MooseX::Params::Validate;
16 my %params = validated_hash(
18 foo => { isa => 'Str' },
28 my @args = ( bar => delete $p{bar} );
30 my %params = validated_hash(
32 bar => { isa => 'Str' },
35 $params{bar}, $self->$orig(%p);
43 my @args = ( quux => delete $p{quux} );
45 my %params = validated_hash(
47 quux => { isa => 'Str' },
50 $params{quux}, $self->$orig(%p);
57 is_deeply( [ $foo->foo( foo => 1, bar => 2, quux => 3 ) ],
59 'multiple around wrappers can safely be cached' );
61 is_deeply( [ $foo->foo( foo => 1, bar => 2, quux => 3 ) ],
63 'multiple around wrappers can safely be cached (2nd time)' );