in reply to Re^2: Getopt::Long case matching last wins
in thread Getopt::Long case matching last wins
Interestingly it does flag the aliases for me:
$ perl -MGetopt::Long -we 'GetOptions ("a|x" => \$x, "A|y" => \$y);' Name "main::y" used only once: possible typo at -e line 1. Name "main::x" used only once: possible typo at -e line 1. Duplicate specification "A|y" for option "a" $ perl -MGetopt::Long -we 'GetOptions ("a|x" => \$x, "b|X" => \$y);' Name "main::y" used only once: possible typo at -e line 1. Name "main::x" used only once: possible typo at -e line 1. Duplicate specification "b|X" for option "x"
So if either the primary or the alias is non-unique in a case-insensitive way, the warning is shown. I'm using version 2.52 of Getopt::Long.
🦛
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Getopt::Long case matching last wins
by karlberry (Sexton) on May 30, 2023 at 21:26 UTC | |
by hv (Prior) on May 30, 2023 at 22:42 UTC | |
by karlberry (Sexton) on Jun 02, 2023 at 22:40 UTC |