|
Posted by Martijn Lievaart on January 11, 2008, 4:40 pm
Please log in for more thread options
On Fri, 11 Jan 2008 13:11:23 -0800, Yuri Shtil wrote:
> 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->;
>
> # ....
> }
Maybe something like this?
sub foo {
local @ARGV = @_;
$r = GetOptions(...);
...
}
M4
|