my %opts = ( 'foo' => 'default_value', 'bar' => 'another_default_value', 'baz' => 'yet_another' ); GetOptions( \%opts, override, default, values, here); My::Class->method( \%opts ); # ... elsewhere in your code ... package My::Class; my $class = shift; my $opts_ref = shift; ... #### 'h|help' => sub { help() },