made numeric argument to --verbose optional

This commit is contained in:
Troy Will 2009-04-12 23:04:33 -07:00 committed by Adam Spiers
parent 582335dfe3
commit 8faa1fff7a

View file

@ -176,7 +176,7 @@ sub process_options {
Getopt::Long::config('no_ignore_case', 'bundling', 'permute');
GetOptions(
'v' => sub { $Option{'verbose'}++ },
'verbose=s' => sub { $Option{'verbose'} = $_[1] },
'verbose:i' => sub { $Option{'verbose'}+= $_[1] || 1 },
'h|help' => sub { $Option{'help'} = '1' },
'n|no|simulate' => sub { $Option{'simulate'} = '1' },
'c|conflicts' => sub { $Option{'conflicts'} = '1' },