Parsing function args in Getopt::Long style

Parsing function args in Getopt::Long style

am 11.01.2008 22:11:23 von Yuri Shtil

Is there a module to parse named function parameters in Getopt::Long style?

What I have in mind is something like:

# Call function
&foo('-p1' -> $v1, '-p2' => $v2);

#Define function
sub foo {
my $options = PARSER(@_);

my $v1 = $options->{'p1'};

# ....
}