Getopt-Chain
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
t/v005-10-usage.t view on Meta::CPAN
mango => {
run => sub {
$run->(@_);
my $context = shift;
},
},
},
);
local @ARGV = qw/--apple mango/;
undef @path;
$options = Getopt::Chain->process(%process);
cmp_deeply($options, { qw/apple 1/ });
cmp_deeply(\@path, [ undef, qw/mango/ ]);
local @ARGV = qw/grape --banana ripe/;
undef @path;
$options = Getopt::Chain->process(%process);
cmp_deeply($options, { qw/banana ripe/ });
cmp_deeply(\@path, [ undef, qw/grape/ ]);
local @ARGV = qw/--apple grape --banana ripe/;
undef @path;
$options = Getopt::Chain->process(%process);
cmp_deeply($options, { qw/apple 1 banana ripe/ });
cmp_deeply(\@path, [ undef, qw/grape/ ]);
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.602 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )