MailScanner / v5

MailScanner v5
GNU General Public License v2.0
188 stars 60 forks source link

MailScanner complains about Duplicate specification for options. #680

Closed msapiro closed 9 months ago

msapiro commented 9 months ago

Describe the bug Invocations of the MailScanner command print

Duplicate specification "h|H|help" for option "h"
Duplicate specification "v|V|version|Version" for option "v"
Duplicate specification "v|V|version|Version" for option "version"
Duplicate specification "c|C|changed" for option "c"

To Reproduce

Give a command like

MailScanner --processing

Output if any will start with the above 4 Duplicate ... lines

Expected behavior

The Duplicate ... lines should not be output.

This is apparently due to recent changes in the perl Getopt::Long module. It is treating options case insensitively per the ignore_case option being enabled https://perldoc.perl.org/Getopt::Long#ignore_case-(default:-enabled). Thus, H is a duplicate of h, V is a duplicate of v, Version is a duplicate of version and so on.

I'll submit a PR