X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FParams%2FValidate.pm;h=c2f691b2bf28739d924fae0e3a34326e1ca18b63;hb=refs%2Ftags%2Fv0.16;hp=e05c0b7c0e3b239a3301bc9c29a37dd7712f7cde;hpb=ddc128beb3cc265ce4be4854b4431e2246f788ee;p=gitmo%2FMooseX-Params-Validate.git diff --git a/lib/MooseX/Params/Validate.pm b/lib/MooseX/Params/Validate.pm index e05c0b7..c2f691b 100644 --- a/lib/MooseX/Params/Validate.pm +++ b/lib/MooseX/Params/Validate.pm @@ -48,7 +48,7 @@ sub validated_hash { my $instance; $instance = shift @$args if blessed $args->[0]; - my %args + my %args = @$args == 1 && ref $args->[0] && reftype( $args->[0] ) eq 'HASH' ? %{ $args->[0] } : @$args; @@ -101,7 +101,7 @@ sub validated_list { my $instance; $instance = shift @$args if blessed $args->[0]; - my %args + my %args = @$args == 1 && ref $args->[0] && reftype( $args->[0] ) eq 'HASH' ? %{ $args->[0] } : @$args;