Bug 21846: Fix pod2usage return values
According to existing pattern. However I am not sure it makes sense to return an errno (and print to STDERR) if --help is passed. Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
fa4aeaa87e
commit
d7c0547bd2
1 changed files with 3 additions and 6 deletions
|
@ -65,15 +65,12 @@ binmode( STDOUT, ":encoding(UTF-8)" );
|
|||
my $help;
|
||||
my $verbose;
|
||||
|
||||
my $result = GetOptions(
|
||||
GetOptions(
|
||||
'help|h' => \$help,
|
||||
'verbose|v' => \$verbose
|
||||
);
|
||||
) or pod2usage(2);
|
||||
|
||||
if ( not $result or $help ) {
|
||||
pod2usage();
|
||||
exit 0;
|
||||
}
|
||||
pod2usage(1) if $help;
|
||||
|
||||
fix_tags_approval($verbose);
|
||||
fix_tags_index( $verbose );
|
||||
|
|
Loading…
Reference in a new issue