use Params::Validate qw (validate_with); sub example_method { my $self = shift; my %args = validate_with ( params => \@_, spec => { thing => 1, handle => 1 }, normalize_keys => sub { return lc($_[0]); }, ); my ($handle, $thing) = @args{'handle','thing'}; #... }